Need to limit Commerce Shipping Condition to only fire if there are no items that do not match We need the condition to trigger only if the cart items match the categories listed and there are no products that do not match.
Is there a way to limit Commerce Shipping Method Conditions (Product-&gt;Order Contains Product Categories) to trigger only if the order products match the categories and there none that do not match?
Unfortunately, the way that condition was written, it only matches for, &quot;Order contains any products from these categories.&quot; The logic you're looking for is, &quot;Order contains only products from these categories.&quot; For that, you'd need to write a custom condition plugin. This would be a reasonable core feature request for Drupal Commerce and would apply for the other &quot;contains&quot; conditions as well ... which leads me to believe we might implement it as an &quot;operator&quot; select list on the condition itself.