WPRuby Logo WPRuby
Log in Get started
  • Plugins
  • Docs
  • Blog
    • eCommerce
    • Plugins
    • How to
    • Coding
  • Affiliate Area
  • Contact Us
  • About Us
  • Plugins
  • Docs
  • Blog
    • eCommerce
    • Plugins
    • How to
    • Coding
  • Affiliate Area
  • Contact Us
  • About Us

WPRuby Account

4
  • How to upgrade your license
  • How to renew your license
  • How to change your plugin’s license domain
  • How to cancel your subscription.

WooCommerce Australia Post Shipping Method Pro

17
  • Installation
  • How to activate your plugin license
  • How to Upgrade from Free to Pro
  • Australia Post Zone Settings
  • Australia Post Global Settings
  • Australia Post Tracking
  • Pre-Paid Satchels
  • How to Mark a Product to be Shipped individually?
  • TroubleShooting and Common issues
  • Available WordPress Actions and Filters
  • [Labels Pro] How to connect the plugin with your MyPost Business account
  • [Labels Pro] How to connect Labels Pro with your eParcel account
  • [Labels Pro] How to create shipping labels?
  • [Labels Pro] How to print labels and create shipping orders.
  • [Labels Pro] Label Printing & Contracted Prices Credentials
  • [Labels Pro] How to Mark a Product as Containing Hazardous Materials?
  • Step by Step Guide on how to migrate to Shipping Zones

WooCommerce Custom Payment Gateway Pro

11
  • Getting Started
  • Custom Payment Gateway Settings
  • Custom Checkout Field Builder
  • Conditional Display Rules
  • Sending Payment Data to an External API
  • How to Create a Pay by Invoice Payment Method
  • How to Create a Manual Payment Link or Review-Based Payment Method
  • Troubleshooting
  • Frequently Asked Questions
  • Security and Sensitive Payment Data
  • How to Upgrade from Free to Pro

WooCommerce Royal Mail Shipping Calculator Pro

4
  • Installation
  • Settings
  • TroubleShooting and Common issues
  • How to activate your plugin license

Controlled Admin Access Pro

3
  • Available Actions for a Restricted Admin
  • Installation
  • Settings

WooCommerce Simple Table Rates Pro

8
  • Installation
  • Settings
  • Rules and Actions
  • How to Setup Weight Based Shipping
  • How To Setup Shipping By Shipping Class
  • How to Setup Shipping by Cart Total
  • How to Setup Shipping by Product
  • How to Setup Shipping by Product Category

WooCommerce Pack IQ

5
  • Installation
  • How to activate your plugin license
  • How to add a new box
  • How to change the boxes weight and dimensions units
  • How to view the packing results

WooCommerce Restricted Shipping and Payment Pro

4
  • Installation
  • Setting Up Shipping Methods Conditions
  • Available Shipping & Payment Rules
  • Setting Up Payment Gateways Conditions

Affiliate Butler PRO

9
  • Installation and Upgrade
  • Quick Start Guide
  • Settings
  • Keywords Management
  • Installation
  • Frequently Asked Questions
  • Files Structure
  • Links Types
  • Statistics

WooCommerce Adyen Payment Gateway

2
  • Setup the Adyen payment gateway
  • How to configure Adyen Webhook notifications? 

WooCommerce Free Shipping Per Product

2
  • Installation
  • How to setup free shipping for a certain product

WooCommerce UPS Shipping Method Pro

4
  • Installation
  • UPS Zone Settings
  • UPS Global Settings
  • How to get the UPS Access Key?

Delivery Promise for WooCommerce

9
  • Getting Started
  • Understanding Processing Time vs Transit Time
  • Setting the Cutoff Countdown
  • Configuring Default Delivery Estimates
  • Creating Delivery Rules
  • Setting Working Days and Holidays
  • Using Rule Presets
  • Product-Level Lead Times
  • Why the “Order Within” Countdown Is Not Showing
View Categories
  • Home
  • Knowledge Base
  • WooCommerce Custom Payment Gateway Pro
  • Conditional Display Rules

Conditional Display Rules

Waseem
Updated on July 7, 2026

5 min read

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.

Table of Contents

Toggle
  • What conditional display rules do
  • How to enable them
  • Show this gateway when
  • How condition rows work
  • Available condition types and operators
    • Customer country
    • Cart total
    • Cart subtotal
    • Shipping method
    • Product categories
    • Products
    • User role
    • Logged-in status
    • Coupon used
    • Currency
  • Practical examples
    • Show gateway only for a specific customer country
    • Show gateway only above a certain order total
    • Show gateway only to wholesale customers
    • Show Pay by Invoice only when cart contains B2B products
    • Combine conditions (all must match)
  • Testing conditional rules
  • Troubleshooting

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

  1. Go to WooCommerce → Settings → Payments.
  2. Click Manage on your gateway.
  3. Find Conditional Display Rules.
  4. Check Enable conditional display rules.
  5. Add one or more conditions.
  6. 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:

OptionBehavior
All conditions matchEvery 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:

ColumnDescription
Condition typeWhat to check (country, cart total, and so on)
OperatorHow to compare (is, greater than, cart contains, and so on)
ValueThe 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).

OperatorMeaning
isCountry is exactly the selected value
is notCountry is not the selected value
inCountry is in the selected list
not inCountry 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).

OperatorMeaning
greater thanTotal is above the value
greater than or equalTotal is at or above the value
less thanTotal is below the value
less than or equalTotal is at or below the value
equalsTotal equals the value
not equalsTotal 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.

OperatorMeaning
isMatches the selected method
is notDoes not match
inMatches any in the selected list
not inDoes not match any in the list

Value: Multi-select list of available shipping methods.


Product categories

Checks product categories in the cart.

OperatorMeaning
cart containsCart includes a product from the category
cart does not containCart has no products from the category
cart only containsAll cart products are from the selected categories
cart contains any ofCart includes at least one of the selected categories
cart contains all ofCart includes products from all selected categories

Value: Multi-select list of product categories.


Products

Checks specific products in the cart.

OperatorMeaning
cart containsCart includes the product
cart does not containCart does not include the product
cart contains any ofCart includes at least one listed product
cart contains all ofCart 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.

OperatorMeaning
isUser has the selected role
is notUser does not have the role
inUser has any of the selected roles
not inUser does not have any of the selected roles

Value: Multi-select list of roles.


Logged-in status

Checks whether the customer is logged in.

OperatorMeaning
is logged inCustomer is logged in
is guestCustomer is not logged in

Value: No value needed.


Coupon used

Checks coupons applied to the cart.

OperatorMeaning
contains couponCart uses the specified coupon
does not contain couponCart does not use the coupon
contains any ofCart uses at least one listed coupon
contains all ofCart uses all listed coupons

Value: Coupon codes, comma separated.


Currency

Checks the store currency for the checkout session.

OperatorMeaning
isCurrency matches
is notCurrency does not match
inCurrency is in the selected list
not inCurrency 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.

  1. Enable conditional display rules.
  2. Add condition:
    • Condition type: Customer country
    • Operator: is
    • Value: Your country (for example, United States)
  3. Save changes.

Show gateway only above a certain order total

Use when manual approval is required for large orders only.

  1. Enable conditional display rules.
  2. Add condition:
    • Condition type: Cart total
    • Operator: greater than
    • Value: 1000
  3. Save changes.

Show gateway only to wholesale customers

  1. Enable conditional display rules.
  2. Add condition:
    • Condition type: User role
    • Operator: is
    • Value: wholesale_customer (or your wholesale role)
  3. Save changes.

Show Pay by Invoice only when cart contains B2B products

  1. Enable conditional display rules.
  2. Add condition:
    • Condition type: Product categories
    • Operator: cart contains
    • Value: Your B2B category
  3. Save changes.

Combine conditions (all must match)

Show bank transfer only for UK customers with orders over £200:

Condition typeOperatorValue
Customer countryisUnited Kingdom
Cart totalgreater than200

Both conditions must be true.


Testing conditional rules

  1. Turn on Enable Debug Mode on the gateway.
  2. Log in as an administrator.
  3. Build a test cart that should and should not match your rules.
  4. 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.

Custom Checkout Field BuilderSending Payment Data to an External API
WPRuby Logo WPRuby

In 2015, WPRuby was established as an independent agency where we focus on producing and supporting many WordPress plugins. Each product we develop is simple to use and easy to customize and backed by awesome support and regular updates.

Resources

  • Knowledge Base
  • Affiliate Area
  • About Us
  • WPTools
  • Nomad Jar

Legal

  • Privacy Policy
  • Terms of Use

Follow us

  • Github
  • X.com
  • LinkedIn
  • Facebook

© 2026 - WPRuby