• Resolved prokops

    (@prokops)


    Hello!

    I use your plugin Conditional Shipping.
    I am looking for being able to create Condition 1 AND Condition 2, or Condition 2 OR Condition 3

    Can I make AND & OR condtions inside the rules?

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)
  • Editing — sorry folks, got a notification about this and acted too fast, thinking this was in the official WooCommerce forum. Please ignore.

    • This reply was modified 4 years, 11 months ago by SomewhereWarm.
    Plugin Author WP Trio

    (@wooelements)

    Hi!

    Conditions inside one ruleset are evaluated with AND operator. You can use OR operator by creating multiple rulesets. For example, if you want to disable shipping method if subtotal is greater than $ 100 OR products includes X, you would need two rulesets. The first one would disable based on subtotal and another one based on products.

    Does this make sense?

    Thread Starter prokops

    (@prokops)

    Thanks for the answer. I however have an associated problem.

    Since I have 3 overlapping width/length categories, I have opted for the “Enable” action on my conditions. As per your instructions, I made two conditions to have an “OR” rule.

    So my product is 108 x 87 cm LxW.

    Condition 1 is “IF product length > 120 THEN enable Shipping X”
    Condition 2 is “IF product width > 80 THEN enable Shipping X”

    As you see, the rule does not pass as the product doesnt pass both length and width. I cannot use “disable” rules, since that would make every conditions below these measurements complicated and create new sets of problems.

    What I am looking for is an “OR” condition that would pass the above rule – either over L 120 or over W 80: “IF product length > 120 OR width > 80 THEN enable Shipping X”

    How would I achieve this?

    • This reply was modified 4 years, 10 months ago by prokops.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AND / OR conditions’ is closed to new replies.