CatCode Conditional Shipping And Payment Rules For WooCommerce Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
WooCommerce shows every shipping method and every gateway that fits the zone. Real shops often need less than that: no cash on delivery for guests, free pickup only for wholesale accounts, no courier for small orders, a separate set of gateways for customers abroad.
This plugin turns that into rules you can read: hide (or keep only) these shipping methods or these payment gateways when the cart in front of you looks like this.
Conditions
- Customer role — including “guest” (anyone not logged in) and “any logged-in customer”.
- Country — the shipping country, or the billing country in shops that do not ship.
- Cart total — from / to, including or excluding tax, goods only or goods plus shipping (for payment rules).
Every filled-in condition has to hold. An empty condition is not a condition — it is simply not checked.
As many rules as you need
Rules run in priority order, lowest number first, and each one narrows what is left — a later rule cannot bring back a method an earlier one removed. Every rule can be switched off without deleting it.
Both checkouts, one decision
The classic checkout and the block checkout obey the same rules from the same PHP. Shipping rates are filtered where WooCommerce calculates them. For payment gateways the block checkout also asks on the client, and the answer it gets is the decision PHP already made and sent along with the cart, so a hidden gateway is refused by the Store API as well — it is not only hidden on screen.
The shipping-rate cache
WooCommerce caches the calculated rates in the session under a hash of the shipping package. The shopper’s role, the plugin settings and the rules themselves are not part of that package, so the plugin adds them as one extra key: the cache is refreshed exactly when the answer changes, and saving the rules refreshes it for every visitor.
Never a dead checkout
If the rules would remove every shipping method or every gateway, the full list is handed back instead and a line goes into the log. You can switch that guard off when “nothing available for this segment” is genuinely what you want.
Other details
- Rules do not touch orders created by hand in wp-admin — they are about what a shopper may pick.
- Optional log of every decision in WooCommerce Status Logs, source “ccsr”.
- Compatible with High-Performance Order Storage (HPOS) and the Cart and Checkout blocks.
- No external services, no tracking, nothing is sent anywhere.
Screenshots
No screenshots provided
