Conditional display rules let you control when a custom payment gateway appears at checkout. Use them to show a method only to certain customers, order sizes, or cart contents.
What conditional display rules do
By default, an enabled gateway is available to all customers at checkout (subject to debug mode). When you enable conditional display rules, the gateway is shown only when your configured conditions are met.
If rules are enabled but no conditions match, the gateway is hidden.
How to enable them
- Go to WooCommerce → Settings → Payments.
- Click Manage on your gateway.
- Find Conditional Display Rules.
- Check Enable conditional display rules.
- Add one or more conditions.
- Click Save changes.
If conditional display rules are not enabled, the gateway follows its normal enabled/disabled setting.
Show this gateway when
Choose how multiple conditions are combined:
| Option | Behavior |
|---|---|
| All conditions match | Every condition must be true for the gateway to appear. |
| Any condition matches (coming soon) | Not available yet in the current release. Only All conditions match is active. |
How condition rows work
Each condition has three parts:
| Column | Description |
|---|---|
| Condition type | What to check (country, cart total, and so on) |
| Operator | How to compare (is, greater than, cart contains, and so on) |
| Value | The value to compare against |
Use Add condition to add a row. Use Remove to delete a row.
Available condition types and operators
These are the condition types supported by the plugin:
Customer country
Checks the customer’s billing or shipping country at checkout (shipping country is used when the cart needs shipping).
| Operator | Meaning |
|---|---|
| is | Country is exactly the selected value |
| is not | Country is not the selected value |
| in | Country is in the selected list |
| not in | Country is not in the selected list |
Value: Multi-select list of countries.
Cart total
Checks the cart total including taxes and shipping (as calculated at checkout).
| Operator | Meaning |
|---|---|
| greater than | Total is above the value |
| greater than or equal | Total is at or above the value |
| less than | Total is below the value |
| less than or equal | Total is at or below the value |
| equals | Total equals the value |
| not equals | Total does not equal the value |
Value: Number (for example, 500).
Cart subtotal
Checks the cart subtotal before shipping and some adjustments.
Uses the same operators as Cart total.
Value: Number.
Shipping method
Checks the shipping method selected at checkout.
| Operator | Meaning |
|---|---|
| is | Matches the selected method |
| is not | Does not match |
| in | Matches any in the selected list |
| not in | Does not match any in the list |
Value: Multi-select list of available shipping methods.
Product categories
Checks product categories in the cart.
| Operator | Meaning |
|---|---|
| cart contains | Cart includes a product from the category |
| cart does not contain | Cart has no products from the category |
| cart only contains | All cart products are from the selected categories |
| cart contains any of | Cart includes at least one of the selected categories |
| cart contains all of | Cart includes products from all selected categories |
Value: Multi-select list of product categories.
Products
Checks specific products in the cart.
| Operator | Meaning |
|---|---|
| cart contains | Cart includes the product |
| cart does not contain | Cart does not include the product |
| cart contains any of | Cart includes at least one listed product |
| cart contains all of | Cart includes all listed products |
Value: Product IDs, comma separated (for example, 15,28,90).
User role
Checks the logged-in user’s WordPress role. Guests are treated as the guest role.
| Operator | Meaning |
|---|---|
| is | User has the selected role |
| is not | User does not have the role |
| in | User has any of the selected roles |
| not in | User does not have any of the selected roles |
Value: Multi-select list of roles.
Logged-in status
Checks whether the customer is logged in.
| Operator | Meaning |
|---|---|
| is logged in | Customer is logged in |
| is guest | Customer is not logged in |
Value: No value needed.
Coupon used
Checks coupons applied to the cart.
| Operator | Meaning |
|---|---|
| contains coupon | Cart uses the specified coupon |
| does not contain coupon | Cart does not use the coupon |
| contains any of | Cart uses at least one listed coupon |
| contains all of | Cart uses all listed coupons |
Value: Coupon codes, comma separated.
Currency
Checks the store currency for the checkout session.
| Operator | Meaning |
|---|---|
| is | Currency matches |
| is not | Currency does not match |
| in | Currency is in the selected list |
| not in | Currency is not in the selected list |
Value: Multi-select list of currencies.
Practical examples
Show gateway only for a specific customer country
Use when Pay by Invoice is only available domestically.
- Enable conditional display rules.
- Add condition:
- Condition type: Customer country
- Operator: is
- Value: Your country (for example, United States)
- Save changes.
Show gateway only above a certain order total
Use when manual approval is required for large orders only.
- Enable conditional display rules.
- Add condition:
- Condition type: Cart total
- Operator: greater than
- Value:
1000
- Save changes.
Show gateway only to wholesale customers
- Enable conditional display rules.
- Add condition:
- Condition type: User role
- Operator: is
- Value:
wholesale_customer(or your wholesale role)
- Save changes.
Show Pay by Invoice only when cart contains B2B products
- Enable conditional display rules.
- Add condition:
- Condition type: Product categories
- Operator: cart contains
- Value: Your B2B category
- Save changes.
Combine conditions (all must match)
Show bank transfer only for UK customers with orders over £200:
| Condition type | Operator | Value |
|---|---|---|
| Customer country | is | United Kingdom |
| Cart total | greater than | 200 |
Both conditions must be true.
Testing conditional rules
- Turn on Enable Debug Mode on the gateway.
- Log in as an administrator.
- Build a test cart that should and should not match your rules.
- Confirm the gateway appears or hides as expected at checkout.
When debug mode is on and rules hide the gateway, the plugin may log this for troubleshooting.
Troubleshooting
If the gateway does not appear, see Troubleshooting — Conditional rules are preventing the gateway from showing.