diff --git uc_attribute/uc_attribute.ca.inc uc_attribute/uc_attribute.ca.inc index 22646b8..ab147ac 100644 --- uc_attribute/uc_attribute.ca.inc +++ uc_attribute/uc_attribute.ca.inc @@ -45,8 +45,19 @@ function uc_attribute_condition_ordered_product_option($order, $settings) { // Once the order is made, the attribute data is changed to just the names. // If we can't find it by ID, check the names. if (is_int(key($attributes))) { - if (in_array($settings['attribute_option'], $attributes)) { - $result = TRUE; + foreach ($attributes as $attribute => $option) { + // Sometimes more than one option can be available (checkboxes). + if (is_array($option) && in_array($settings['attribute_option'], $option)) { + $result = TRUE; + break; + } + // Other times, only one option and we can directly compare. + else if ($option == $setting['attribute_options']) { + $result = TRUE; + break; + } + } + if ($result) { break; } }