Conditional Payments and Shipping for WooCommerce
Show or hide payment methods and shipping options at checkout based on cart, product, customer, location and date rules.
- Block cart and checkout
- Classic cart and checkout
- High-performance order storage
- WooCommerce 9 – 11
- WordPress 6.6 – 7.1
- PHP 7.4+
Conditional Payments & Shipping
- 29 condition types: totals, weight, items, categories, roles, countries, dates and more
- Hide or show any gateway or shipping method, by method or by zone instance
- Works on the block checkout and the classic checkout
- Debug log shows why a method was hidden
What Conditional Payments & Shipping does
Decide exactly which payment gateways and shipping methods each customer sees at checkout. Disable cash on delivery for large orders, restrict local pickup to postcodes near your store, hide express shipping for heavy carts, or keep bank transfer for wholesale customers.
Each rule picks one or more methods and either **hides** them when its conditions match, or **only shows** them when its conditions match. Rules work on the block checkout, the classic checkout and the pay for order page, and WooCommerce refuses an order placed with a hidden method.
Conditional Payments & Shipping features
Conditions
- Cart: subtotal, order total, item quantity, number of products, weight, coupons
- Products in cart: products and variations, categories (sub-categories included), tags, shipping classes, product types (physical, virtual, downloadable, on sale, on backorder), with "any of", "all of", "none of" and "only" matching
- Customer: user role (including guests), email address or domain, number of previous paid orders, total spent
- Billing and shipping address: country, state, postcode (wildcards and ranges), city, shipping zone
- Checkout: chosen shipping method (for payment rules), currency
- Date and time: day of the week, time of day (overnight ranges too), date ranges
Also included
- Match all conditions or any one of them
- Target a shipping method type in every zone, or one method in one zone
- Hide paid shipping when free shipping is available, optionally keeping local pickup
- Enable, disable, duplicate and delete rules from the list
- Import and export rules as JSON to back them up or copy them to another store
- Debug log that records which rule removed which method
- Pause every rule with one switch
- Works with High-Performance Order Storage and with Cart and Checkout blocks
Common rules, and how to write them
Most stores want the same handful of rules. Each one below is a single rule in the plugin: pick the methods it applies to, choose whether the rule hides them or only shows them, and add the conditions.
| What you want | Rule | Conditions |
|---|---|---|
| No cash on delivery on big orders | Hide Cash on delivery | Order total is 200 or more |
| Cash on delivery only for pickup | Only show Cash on delivery | Chosen shipping method is Local pickup |
| Bank transfer for trade customers only | Only show Direct bank transfer | User role is Wholesale |
| No PayPal for one country | Hide PayPal | Billing country is Brazil |
| Local pickup only near the shop | Only show Local pickup | Shipping postcode matches 560* |
| No express shipping for heavy carts | Hide Express (every zone) | Cart weight is more than 20 kg |
| Next-day delivery on weekdays before noon | Only show Next day | Day is Monday to Friday, time is before 12:00 |
| Disable a gateway while a sale runs | Hide Afterpay | Date is between 24 and 30 November |
Rules can match all of their conditions or any one of them, and a method is hidden if any enabled rule removes it. "Hide paid shipping when free shipping is available" is a one-click option in the settings rather than a rule, and local pickup can be kept alongside it. If a method is missing and you cannot see why, the debug log names the rule that removed it.
How it compares with other conditional payment and shipping plugins
Most plugins in this space do one half of the job: a conditional payments plugin that restricts gateways, or a conditional shipping plugin that hides shipping methods. Many stores end up installing one of each, with two rule screens that cannot see each other's conditions. Conditional Payments and Shipping covers both from one rules list, with the same 29 condition types on either side, so a payment rule can depend on the chosen shipping method and a shipping rule on the customer's role.
It is also built to be checked, not just configured. Every rule in the list has a plain-language summary of what it does, the debug log records which rule removed which method for a given checkout, one switch pauses every rule while you investigate, and rules export as JSON so a staging store can be set up to match the live one in a minute.
It works with any payment gateway that registers with WooCommerce, including Stripe, PayPal, Klarna and the gateways bundled with WooCommerce, and with every shipping method in your zones, whether from WooCommerce itself or another plugin such as Table Rate Shipping. The block checkout, the classic checkout and the pay-for-order page all follow the same rules.
How to set up Conditional Payments & Shipping in WooCommerce
- 1
Upload the plugin to
/wp-content/plugins/or install the zip from Plugins > Add New > Upload Plugin. - 2
Activate it.
- 3
Go to WooCommerce > Payment & Shipping Rules and add your first rule.
Questions about Conditional Payments & Shipping
Does it work with the block checkout?
Yes. The block checkout, the classic shortcode checkout and the pay for order page all follow the same rules, and the list of methods updates as the customer changes their address, email or shipping method.
What happens when two rules target the same method?
A method is hidden if any enabled rule removes it. A "hide" rule removes its methods when its conditions match. An "only show" rule removes its methods when its conditions do not match.
Can a customer still pay with a hidden method?
No. WooCommerce checks the available methods again when the order is placed and rejects a hidden one.
Which items do shipping rules look at?
The whole cart. If another plugin splits the cart into several shipments, each shipment's rules look at that shipment's items.
What does "Order total" include?
Everything the customer pays: products after discounts, shipping, fees and tax. It is available for payment rules. Shipping rules can use the cart subtotal.
Does it work with Stripe, PayPal and other third-party gateways?
Yes. Rules apply to every payment gateway that registers with WooCommerce, from any plugin, and to every shipping method in your zones, including methods added by other plugins.
Can a payment method depend on the shipping method?
Yes. "Chosen shipping method" is a condition for payment rules, so cash on delivery can be offered only with local pickup, or a gateway hidden when the customer picks express delivery.
Can I restrict shipping by postcode or region?
Yes. Address conditions cover country, state, city, shipping zone and postcode, and postcodes accept wildcards such as 560* and ranges such as 10000-19999.
Can I switch the rules off without deleting them?
Yes. Each rule has its own enable switch, and one master switch in the settings pauses every rule at once while you investigate a checkout.
Conditional Payments & Shipping changelog
- 1.0.0
- Initial release.
Plugins that pair with Conditional Payments & Shipping
Payment Gateway Fees
Charge a fee or give a discount per payment method. Fixed or percentage, taxable or not, on both the classic and the block checkout.
View plugin
Wholesale Pricing
Wholesale prices by customer role, with signup approval, hidden prices, wholesale-only products, minimum orders and tax exemption.
View plugin
Table Rate Shipping
Shipping rates from a table of rules by weight, price, item count and shipping class, per order, per item or per class.
View plugin