
Conditional Shipping & Payment Rules for WooCommerce — show shipping and payment methods by condition
Hide or keep only the shipping methods and payment gateways that fit: by customer role, a site cookie, city, postcode, weight, cart total and cart contents. WooCommerce classic and block checkout.
- Compatibility
- WordPress 5.6+ · WooCommerce 6.0+ (tested on WP 7.1 / Woo 11.1) · PHP 7.4+ · HPOS · classic and block checkout
- Licence
- one site, annual
- Trial
- 7 days, no card, one per site
What Free has,
and what Pro adds
The free version works with no time limit. Pro adds the rest of the features in the table.
What it looks like
Key points
What the customer sees
The customer sees nothing special — and that is the point. They simply get a shorter, correct list.
What the admin gets
A separate page, WooCommerce → Shipping & payment rules. Each rule is a card: what to do, with which methods, under which conditions.

The trial starts when you ask
A fresh install is the free version, nothing switches on by itself. The “Try Pro for 7 days” button → e-mail → the key right in the window and by e-mail.

One key — one site
Moving the store? Unbind the licence on the old domain and activate it on the new one yourself. If our server is unreachable, Pro keeps working for 14 more days. For studios — keys for 5 or 25 sites, or unlimited.
Technical requirements
WooCommerce 6.0+ with the classic or the block checkout, HPOS compatible.
WordPress 5.6+ · PHP 7.4+
Works with any shipping method and payment gateway registered the standard way: flat rate, local pickup, free shipping, carrier plugins, payment gateways.
The plugin does not change shipping prices — it decides which methods are offered. Prices stay with WooCommerce and your table-rate plugin.
Tested on WordPress 7.1 and WooCommerce 11.1 and 10.7: classic and block checkout, guest and logged-in customer, orders placed to the end.
Version history
The free and Pro versions no longer conflict when installed together, and removing one copy does not erase the rules.
“hide / keep only” rules for shipping methods and payment gateways; conditions by role, cookie, country, state, city, postcode, total, weight, item count, category, product, shipping class,…
Frequently bought with Conditional Shipping & Payment Rules for WooCommerce
4 modules in one order — 40% cheaper than separately


Nova Poshta Premium — a Nova Poshta module for OpenCart 2.3, 3.x and 4.x

LiqPay — Card Payments for OpenCart 2.3, 3.x and 4.x

Telegram notifications and Viber/SMS for customers for OpenCart
Full module description
Conditional Shipping & Payment Rules for WooCommerce shows each customer only the shipping methods and payment gateways that actually fit them. WooCommerce offers everything that matches the shipping zone. A real shop needs less than that: no cash on delivery for guests, courier for one city only, no pickup for a heavy basket, one delivery option for wholesale accounts, its own option for a school or a dealer that arrives through its own link.
The plugin turns that into rules you can read: hide (or keep only) these shipping methods or these payment gateways when the cart and the customer look like this.
What the customer sees
The customer sees nothing special — and that is the point. They simply get a shorter, correct list. They change the city and the shipping list updates without a page reload. They pick the courier and cash on delivery disappears. They pick cash on delivery and local pickup disappears, if that is how you set it up.
- Guests and customers with an account see different sets: for example, cash on delivery only for people who already bought and have an account.
- A school, a dealer, a partner. Your site sets a cookie when someone arrives through their own link, and at checkout they see only their own delivery option. This is exactly the request the plugin started from.
- A hidden method cannot be forced through. Paying with a hidden gateway through a request that bypasses the page returns an error on the block checkout and no order is created. On the classic checkout WooCommerce answers “Invalid payment method”.
What the admin gets
A separate page, WooCommerce → Shipping & payment rules. Each rule is a card: what to do, with which methods, under which conditions.
- Two actions: “Hide” removes the chosen methods, “Keep only” removes everything except them.
- A whole method or one instance in a zone: hide “Flat rate” in every zone or in one zone only.
- Priority: rules run from the lowest number up, and each one only narrows the list. A later rule cannot bring back what an earlier one removed, so the result is easy to predict.
- “All conditions” or “any” — per rule. An empty condition is simply not checked.
- Log: every decision goes to WooCommerce → Status → Logs, so you can see why a method showed up or not.
- Manual orders in the admin are not touched by the rules: the manager sees every method.
How it works, step by step
- The customer opens the cart or the checkout. WooCommerce calculates the shipping methods available for their address.
- The plugin takes a snapshot: role, the cookies your rules read, address, weight, item count, total, categories and shipping classes in the cart, the chosen gateway or shipping method, today’s date in the store’s time zone.
- Rules run in priority order. Each rule whose conditions match hides its methods or keeps only them.
- If no method is left and the guard is on, the customer gets the full list back and a warning goes to the log.
- The classic checkout and the block checkout through the Store API get the same result.
- The customer changes the city, a cookie or a method, and WooCommerce recalculates the rates, because the plugin puts everything the rules read into the shipping package fingerprint. An old list never gets stuck in the cache.
Under the hood
- The shipping-rate cache. WooCommerce caches calculated rates in the session under a hash of the shipping package. Everything a rule reads that is not in that package (role, cookies, chosen gateway, date, the rules themselves, licence state) goes into the package as one extra key. The cache is invalidated exactly when the answer changes, and never more often. This is where similar plugins trip: the customer changed a condition but still sees the old list.
- Block checkout and payments. On the block checkout the list of gateways is assembled in the browser, so a PHP filter alone is not enough. PHP makes the decision and sends it along with the Store API cart; the plugin’s script applies it on the page.
- Cross conditions “payment by shipping” and “shipping by payment” work on both checkouts; their scripts are loaded only when such a rule actually exists.
- An honest free tier. A rule that relies on a Pro condition is skipped entirely on Free rather than run without it. Otherwise “no courier for Hamburg” would turn into “no courier for anyone” after the trial.
- Nothing extra in the database: no custom tables, settings and rules are two options. Deleting the plugin cleans up after itself.
Installation
- Plugins → Add New → Upload Plugin: choose
conditional-shipping-and-payment-rules-for-woocommerce-1.0.1.zipand activate it. - Open WooCommerce → Shipping & payment rules.
- Add a rule: “Hide” or “Keep only”, shipping methods or payment gateways, conditions. Switch it on and save.
- Open the checkout in a private window (as a guest) and with an account — check that the list changes the way you intended.
- For Pro: paste the licence key from the e-mail after payment, or start the 7-day trial with the button on the same page.
Questions
about the module
Didn't find the answer? Message us on Telegram and we'll reply within a business day.
I saved the rule but the method is still showing. Why?
Rules only run on the storefront. Check that the rule is switched on, that the method you picked is the one the zone actually offers, and that the conditions really match your test cart. Switch on the log in the settings and look at WooCommerce → Status → Logs, source "ccsr" — every decision is written there.
Does it work with the block checkout?
Yes. Shipping methods are filtered on the server, so the block checkout gets the same list. Payment gateways are decided on the server too, and the block checkout receives that decision through the Store API. An attempt to pay with a hidden gateway around the page is refused by the server.
I hid everything and now nobody can order.
"Never leave the checkout with no method at all" is on by default and hands the full list back if the rules empty it. If you switched it off, switch it back on.
Can I hide cash on delivery for one city only?
Yes, in Pro: "Hide" → "payment gateways" → pick the gateway, then fill in the City condition. Add the country too if the same city name exists elsewhere.
Does it change shipping prices?
No. It decides which methods are offered; prices stay with WooCommerce and your table-rate plugin.
What happens when the trial ends?
The first switched-on rule with the basic conditions keeps working. Rules that use Pro conditions are kept but skipped until a licence is active: without its condition such a rule would hide more than you asked.
No reviews yet. Be the first.
No questions yet. Ask one — we answer within 24 hours.
Not quite what you are looking for?
We build custom modules for WordPress, WooCommerce, OpenCart and Shopify. Tell us about the task and we'll prepare an estimate.
Order a custom module
Buying the module
—