{"id":374891,"date":"2026-09-25T06:02:50","date_gmt":"2026-09-25T06:02:50","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/conditional-shipping-and-payment-rules-for-woocommerce\/"},"modified":"2026-09-25T06:02:15","modified_gmt":"2026-09-25T06:02:15","slug":"catcode-conditional-shipping-and-payment-rules-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/catcode-conditional-shipping-and-payment-rules-for-woocommerce\/","author":23504569,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"1.0.1","tested":"7.1.2","requires":"6.2","requires_php":"7.4","requires_plugins":null,"header_name":"CatCode Conditional Shipping and Payment Rules for WooCommerce","header_author":"CatCode","header_description":"Show or hide WooCommerce shipping methods and payment gateways by customer role, country and cart total. Works on both the classic and the block checkout, and keeps WooCommerce's shipping-rate cache in step with the rules.","assets_banners_color":"eaf7f9","last_updated":"2026-09-25 06:02:15","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/catcode.com.ua\/modules\/conditional-shipping-and-payment-rules-for-woocommerce\/","header_author_uri":"https:\/\/catcode.com.ua","rating":0,"author_block_rating":0,"active_installs":0,"downloads":34,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"catcodestudio","date":"2026-09-25 06:02:15","revision":3712456}},"upgrade_notice":{"1.0.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3712457,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3712457,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3712457,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3712457,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[3148,4060,507,3546,286],"plugin_category":[45],"plugin_contributors":[271712],"plugin_business_model":[],"class_list":["post-374891","plugin","type-plugin","status-publish","hentry","plugin_tags-checkout","plugin_tags-conditional","plugin_tags-payment","plugin_tags-shipping","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-catcodestudio","plugin_committers-catcodestudio"],"banners":{"banner":"https:\/\/ps.w.org\/catcode-conditional-shipping-and-payment-rules-for-woocommerce\/assets\/banner-772x250.png?rev=3712457","banner_2x":"https:\/\/ps.w.org\/catcode-conditional-shipping-and-payment-rules-for-woocommerce\/assets\/banner-1544x500.png?rev=3712457","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/catcode-conditional-shipping-and-payment-rules-for-woocommerce\/assets\/icon-128x128.png?rev=3712457","icon_2x":"https:\/\/ps.w.org\/catcode-conditional-shipping-and-payment-rules-for-woocommerce\/assets\/icon-256x256.png?rev=3712457","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>This plugin turns that into rules you can read: <strong>hide<\/strong> (or <strong>keep only<\/strong>) these shipping methods or these payment gateways <strong>when<\/strong> the cart in front of you looks like this.<\/p>\n\n<p><strong>Conditions<\/strong><\/p>\n\n<ul>\n<li>Customer role \u2014 including \"guest\" (anyone not logged in) and \"any logged-in customer\".<\/li>\n<li>Country \u2014 the shipping country, or the billing country in shops that do not ship.<\/li>\n<li>Cart total \u2014 from \/ to, including or excluding tax, goods only or goods plus shipping (for payment rules).<\/li>\n<\/ul>\n\n<p>Every filled-in condition has to hold. An empty condition is not a condition \u2014 it is simply not checked.<\/p>\n\n<p><strong>As many rules as you need<\/strong><\/p>\n\n<p>Rules run in priority order, lowest number first, and each one narrows what is left \u2014 a later rule cannot bring back a method an earlier one removed. Every rule can be switched off without deleting it.<\/p>\n\n<p><strong>Both checkouts, one decision<\/strong><\/p>\n\n<p>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 \u2014 it is not only hidden on screen.<\/p>\n\n<p><strong>The shipping-rate cache<\/strong><\/p>\n\n<p>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.<\/p>\n\n<p><strong>Never a dead checkout<\/strong><\/p>\n\n<p>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.<\/p>\n\n<p><strong>Other details<\/strong><\/p>\n\n<ul>\n<li>Rules do not touch orders created by hand in wp-admin \u2014 they are about what a shopper may pick.<\/li>\n<li>Optional log of every decision in WooCommerce \u2192 Status \u2192 Logs, source \"ccsr\".<\/li>\n<li>Compatible with High-Performance Order Storage (HPOS) and the Cart and Checkout blocks.<\/li>\n<li>No external services, no tracking, nothing is sent anywhere.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin and activate it (WooCommerce must be active).<\/li>\n<li>Open WooCommerce \u2192 Shipping &amp; payment rules.<\/li>\n<li>Edit the example rule or add your own: pick \"Hide\" or \"Keep only\", pick the methods, fill in the conditions, switch the rule on and save.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"a%20method%20is%20still%20showing%20after%20i%20saved%20the%20rule\"><h3>A method is still showing after I saved the rule<\/h3><\/dt>\n<dd><p>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 (the picker shows the rate id in brackets), and that the conditions really match your test cart. Switch on the log in the settings and look at WooCommerce \u2192 Status \u2192 Logs, source \"ccsr\" \u2014 every decision is written there.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20the%20block%20checkout%3F\"><h3>Does it work with the block checkout?<\/h3><\/dt>\n<dd><p>Yes. Shipping methods are filtered on the server, so the block checkout sees the same list. Payment gateways are filtered on the server as well, and the block checkout is told the same decision through the Store API, because that checkout decides on the client too.<\/p><\/dd>\n<dt id=\"i%20hid%20everything%20and%20now%20nobody%20can%20order\"><h3>I hid everything and now nobody can order<\/h3><\/dt>\n<dd><p>\"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.<\/p><\/dd>\n<dt id=\"can%20i%20hide%20cash%20on%20delivery%20for%20guests%3F\"><h3>Can I hide cash on delivery for guests?<\/h3><\/dt>\n<dd><p>Yes \u2014 that is the example rule the plugin ships with (switched off). Open it, switch it on and save.<\/p><\/dd>\n<dt id=\"does%20it%20change%20shipping%20prices%3F\"><h3>Does it change shipping prices?<\/h3><\/dt>\n<dd><p>No. It decides which methods are offered; prices stay with WooCommerce and your shipping plugins.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20the%20settings%20when%20i%20delete%20the%20plugin%3F\"><h3>What happens to the settings when I delete the plugin?<\/h3><\/dt>\n<dd><p>Deleting the plugin from the Plugins screen removes its options (settings and rules).<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>While the Pro version is active, WooCommerce no longer lists this switched-off copy as incompatible with its features (HPOS, block checkout).<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Show or hide WooCommerce shipping methods and payment gateways by customer role, country and cart total \u2014 on the classic and the block checkout.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/374891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=374891"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/catcodestudio"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=374891"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=374891"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=374891"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=374891"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=374891"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=374891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}