| 开发者 | teetb |
|---|---|
| 更新时间 | 2026年11月6日 18:50 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
ccffw_admin_roles filter to list more). Rules of a specific role replace the "Logged in" rules for users of that role. Works in the classic and the block-based checkout.
Features
[woocommerce_checkout] shortcode) and with the block-based Checkout (Store API).woocommerce_get_country_locale filter (also used for Store API validation) and reloads the checkout when a shipping choice changes the rules. Address field rules apply to the billing and shipping forms together. Email and order notes cannot be changed in the block checkout.
Privacy and licensing
The plugin is completely free, has no locked or paid features, makes no external requests, loads no third-party code and collects no data.
For developers:
ccffw_rules filter – modify the rules ($rules, $type = hide | require).ccffw_class_rules filter – modify the shipping class rules (class slug => disabled shipping method keys).ccffw_blocks_support and ccffw_blocks_reload filters – switch block checkout support or the automatic reload off.local_pickup) applies to all instances of that shipping method.Yes. WooCommerce does not offer conditional rules for the core address fields of the block checkout, so the plugin sets the rules on the server (the documented woocommerce_get_country_locale filter) and reloads the checkout when the selected shipping rate changes them. Rules for address fields apply to the billing and shipping forms together. You can switch the reload off with add_filter( 'ccffw_blocks_reload', '__return_false' ); or block checkout support off with add_filter( 'ccffw_blocks_support', '__return_false' );.
Hiding wins. The settings screen only lets you pick one option per field.
Give those products a shipping class (WooCommerce → Settings → Shipping → Classes, then the Shipping tab of the product). Then open Shipping class rules, open the card of that class and set the method to Disable.
The customer then sees no shipping options, as WooCommerce does when no method matches. Make sure at least one method stays available for every combination of shipping classes.
Not in the current version; rules are set per shipping class. You can filter the rules with ccffw_class_rules.
Yes. The shipping class rules filter the shipping rates themselves, so they apply everywhere WooCommerce shows them.
Logged out visitors, all logged-in users, and every custom role of your site (for example one created by a membership or wholesale plugin). If the site has no custom roles, only "Logged out" and "Logged in" are shown.
The rules of all of that customer's roles are combined. If at least one of the roles has rules of its own, the general "Logged in (any role)" rules are not used for that customer.
The plugin is written in English and is fully translation ready. Translations are provided through translate.wordpress.org.
ccffw_role_rules and ccffw_admin_roles filters.smartdisain-conditional-checkout-rules).