The "Shipping line item exists" rule currently allows checking to see if the shipping line item is for a single selected shipping service. This can get cumbersome if you want a rule that works for some (more than one, but not all) of the shipping services as you currently have to add this rules condition multiple times and wrap the conditions in an Or.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anemirovsky created an issue. See original summary.

anemirovsky’s picture

Status: Active » Needs review
FileSize
1.7 KB

This patch adds the ability to compare to multiple shipping services in one "Shipping line item exists" rules condition.

das-peter’s picture

Status: Needs review » Needs work

I like the idea, but what about existing rules? Did you check if existing rules continue to work or if a re-save or something similar is needed?
We could use a parameter check like following to make it backward compatible: $services = (is_array($services)) ? $services : array($services);.
But I'm not sure how rules behaves if you just change the parameter type.