How to add a condition to a conditional payments rule
Conditions control when a Conditional Payments for WooCommerce rule applies. You add them on the Add Conditional Payments Rules form at WooCommerce > Settings > Payments > Conditions.
Each condition has a field, an operator such as Equal to ( = ), and a value. Click + Add Condition to add another condition to the same rule.
In The Article
How to add conditions
- Go to WooCommerce > Settings > Payments, then open Conditions and click Add New, or open an existing rule.
- In Conditions, choose a condition field, an operator, and a value.
- Click + Add Condition if you need another condition, then continue to Actions and click Save Changes.
The three parts of a condition are the field (for example, Product, Cart Subtotal (Before Discount), or User Role), the operator (for example, Equal to ( = ) or Greater or Equal to), and the value (for example, a product, country, or quantity).
Condition groups
In the current admin, conditions are grouped as follows:
- Product Specific: Product, Variable Product, Product Categories, Product Brands, Product Tags, Product Type, Product Visibility, Product Quantity, Stock Status.
- Cart Specific: Cart Subtotal (Before Discount), Cart Subtotal (After Discount), Cart Subtotal (Specific Products), Cart Quantity, Shipping Class, Coupon, Total Weight, Number Of Items, Total Volume.
- Shipping Specific: Shipping Method.
- Billing Address: First Name, Last Name, Company, Address, Address 2, Country, State / Province, City, Postcode, Email, Phone.
- Customer: Logged in / out, User, User Role, Previous Order (the list continues below Previous Order in the dropdown).
Existing documentation screenshots also show a Shipping Address group (for example, First Name, Last Name, Company, Address, Address 2, Country, City, Postcode) and a Time Specific group (Day Of Week, Date, Time). Those groups are not visible in the current admin condition dropdown screenshot.
The screenshot above is from an earlier plugin version. It does not yet list Product Brands or Cart Subtotal (Specific Products), which appear in the current admin dropdown.
Examples
Example 1: A billing country
Use Country with Equal to ( = ) and a country such as United Kingdom (UK).
Example 2: A specific product
Use Product with Equal to ( = ) and the product you want the rule to match.
Example 3: A cart quantity of 5 or more
Use Cart Quantity with Greater or Equal to and a value of 5. In the checkout example below, Cash on Delivery is hidden when the cart quantity is 5 or more.
Pro Tips
- Use the current group and field names when you build a rule, even if an older screenshot uses a shorter list.
- You can add more than one condition with + Add Condition. The existing debug documentation describes rulesets where all conditions have to pass (AND).
- After you save, test a matching cart and a non-matching cart at checkout.
FAQs
1. Where do I add a condition?
Open a rule at WooCommerce > Settings > Payments > Conditions. The Conditions section is on the Add Conditional Payments Rules form.
2. What does each condition row contain?
A condition field, an operator such as Equal to ( = ), and a value, plus a delete icon and + Add Condition.
3. Are time or shipping-address conditions still available?
Existing documentation screenshots show Time Specific and Shipping Address groups. Those groups are not visible in the current admin dropdown screenshot, so their current placement is unconfirmed.