{"id":392614,"date":"2026-10-27T07:18:30","date_gmt":"2026-10-27T07:18:30","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/conditional-checkout-fields-for-shop\/"},"modified":"2026-10-28T10:09:28","modified_gmt":"2026-10-28T10:09:28","slug":"smartdisain-conditional-checkout-rules","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/smartdisain-conditional-checkout-rules\/","author":18481876,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.4","requires":"6.3","requires_php":"7.4","requires_plugins":null,"header_name":"Smartdisain Conditional Checkout Rules for WooCommerce","header_author":"Teet Bergmann","header_description":"Hide WooCommerce checkout fields or make them required depending on the selected shipping method (e.g. hide address fields for parcel lockers). Can also disable shipping methods by shipping class. Settings: WooCommerce \u2192 Settings \u2192 Shipping.","assets_banners_color":"1e222a","last_updated":"2026-10-28 10:09:28","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":90,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"teetb","date":"2026-10-28 10:09:28","revision":3770396}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3770395,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3770395,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3770395,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3770395,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[61045,16816,264863,10822,286],"plugin_category":[45],"plugin_contributors":[234235],"plugin_business_model":[],"class_list":["post-392614","plugin","type-plugin","status-publish","hentry","plugin_tags-checkout-fields","plugin_tags-conditional-fields","plugin_tags-shipping-classes","plugin_tags-shipping-methods","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-teetb","plugin_committers-teetb"],"banners":{"banner":"https:\/\/ps.w.org\/smartdisain-conditional-checkout-rules\/assets\/banner-772x250.png?rev=3770395","banner_2x":"https:\/\/ps.w.org\/smartdisain-conditional-checkout-rules\/assets\/banner-1544x500.png?rev=3770395","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/smartdisain-conditional-checkout-rules\/assets\/icon-128x128.png?rev=3770395","icon_2x":"https:\/\/ps.w.org\/smartdisain-conditional-checkout-rules\/assets\/icon-256x256.png?rev=3770395","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Smartdisain Conditional Checkout Rules for WooCommerce lets you control the WooCommerce checkout by shipping method and shipping class, without code.<\/p>\n\n<p><strong>1. Checkout fields by shipping method<\/strong><\/p>\n\n<p>For each shipping method (e.g. parcel locker, courier, local pickup) you can choose:<\/p>\n\n<ul>\n<li>fields to hide (e.g. street, city and postcode for a parcel locker);<\/li>\n<li>fields to make required (e.g. phone number).<\/li>\n<\/ul>\n\n<p>Fields are hidden or made required instantly when the customer changes the shipping method at checkout. A hidden field is not validated and is never required (hiding takes precedence over requiring).<\/p>\n\n<p>The settings screen shows one card per shipping method, with a simple Default \/ Hide \/ Required choice for every field, a search box, a \"configured only\" filter and the option to copy rules from another shipping method.<\/p>\n\n<p>Settings: WooCommerce \u2192 Settings \u2192 Shipping \u2192 Checkout fields.<\/p>\n\n<p><strong>2. Shipping methods by shipping class<\/strong><\/p>\n\n<p>A second screen shows one card per shipping class. For every shipping method choose Default (offered as usual) or Disable: a disabled method is not offered when the cart contains a product of that class. Use it, for example, to hide parcel lockers for bulky goods or to offer a courier only for fragile items.<\/p>\n\n<ul>\n<li>Works in the classic checkout, the block-based checkout and the cart.<\/li>\n<li>If the cart contains products of several shipping classes, a method disabled for any of them is not offered.<\/li>\n<li>Same card layout, search and \"copy rules from\" as the checkout fields screen.<\/li>\n<\/ul>\n\n<p>Settings: WooCommerce \u2192 Settings \u2192 Shipping \u2192 Shipping class rules.<\/p>\n\n<p><strong>Features<\/strong><\/p>\n\n<ul>\n<li>Per-shipping-method rules for billing, shipping and order fields.<\/li>\n<li>Per-shipping-class rules for shipping methods.<\/li>\n<li>Block-based checkout (Store API) and classic checkout support.<\/li>\n<li>High-Performance Order Storage (HPOS) compatible.<\/li>\n<li>No coding needed, no external services, no tracking.<\/li>\n<li>Translation ready: all strings are in English and use the plugin text domain, so translations can be contributed on translate.wordpress.org.<\/li>\n<\/ul>\n\n<p><strong>Compatibility<\/strong><\/p>\n\n<ul>\n<li>Requires WooCommerce 9.9 or newer; tested up to WooCommerce 11.2.<\/li>\n<li>Works with the classic checkout (the <code>[woocommerce_checkout]<\/code> shortcode) and with the block-based Checkout (Store API).<\/li>\n<li>Compatible with High-Performance Order Storage (HPOS).<\/li>\n<\/ul>\n\n<p><strong>Block checkout notes<\/strong><\/p>\n\n<p>The block checkout has no per-shipping-method API for its core address fields, so the plugin uses WooCommerce's documented <code>woocommerce_get_country_locale<\/code> 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.<\/p>\n\n<p><strong>Privacy and licensing<\/strong><\/p>\n\n<p>The plugin is completely free, has no locked or paid features, makes no external requests, loads no third-party code and collects no data.<\/p>\n\n<p>For developers:<\/p>\n\n<ul>\n<li><code>ccffw_rules<\/code> filter \u2013 modify the rules (<code>$rules<\/code>, <code>$type<\/code> = <code>hide<\/code> | <code>require<\/code>).<\/li>\n<li><code>ccffw_class_rules<\/code> filter \u2013 modify the shipping class rules (class slug =&gt; disabled shipping method keys).<\/li>\n<li><code>ccffw_blocks_support<\/code> and <code>ccffw_blocks_reload<\/code> filters \u2013 switch block checkout support or the automatic reload off.<\/li>\n<li>A key without an instance ID (e.g. <code>local_pickup<\/code>) applies to all instances of that shipping method.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the zip: Plugins \u2192 Add New \u2192 Upload Plugin.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Open WooCommerce \u2192 Settings \u2192 Shipping \u2192 Checkout fields (and Shipping class rules).<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20it%20work%20with%20the%20block-based%20checkout%3F\"><h3>Does it work with the block-based checkout?<\/h3><\/dt>\n<dd><p>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 <code>woocommerce_get_country_locale<\/code> 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 <code>add_filter( 'ccffw_blocks_reload', '__return_false' );<\/code> or block checkout support off with <code>add_filter( 'ccffw_blocks_support', '__return_false' );<\/code>.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20a%20field%20is%20both%20hidden%20and%20required%3F\"><h3>What happens if a field is both hidden and required?<\/h3><\/dt>\n<dd><p>Hiding wins. The settings screen only lets you pick one option per field.<\/p><\/dd>\n<dt id=\"how%20do%20i%20hide%20a%20shipping%20method%20for%20some%20products%3F\"><h3>How do I hide a shipping method for some products?<\/h3><\/dt>\n<dd><p>Give those products a shipping class (WooCommerce \u2192 Settings \u2192 Shipping \u2192 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.<\/p><\/dd>\n<dt id=\"what%20if%20all%20shipping%20methods%20get%20disabled%3F\"><h3>What if all shipping methods get disabled?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20i%20disable%20a%20shipping%20method%20for%20products%20without%20a%20shipping%20class%3F\"><h3>Can I disable a shipping method for products without a shipping class?<\/h3><\/dt>\n<dd><p>Not in the current version; rules are set per shipping class. You can filter the rules with <code>ccffw_class_rules<\/code>.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20the%20cart%20and%20the%20block-based%20cart%3F\"><h3>Does it work with the cart and the block-based cart?<\/h3><\/dt>\n<dd><p>Yes. The shipping class rules filter the shipping rates themselves, so they apply everywhere WooCommerce shows them.<\/p><\/dd>\n<dt id=\"is%20the%20plugin%20translated%3F\"><h3>Is the plugin translated?<\/h3><\/dt>\n<dd><p>The plugin is written in English and is fully translation ready. Translations are provided through translate.wordpress.org.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Hide checkout fields or make them required depending on the selected shipping method.<\/li>\n<li>Disable shipping methods by shipping class (WooCommerce \u2192 Settings \u2192 Shipping \u2192 Shipping class rules).<\/li>\n<li>Support for the block-based Checkout (Store API), the classic checkout and HPOS.<\/li>\n<li>Modern settings interface: cards, Default \/ Hide \/ Required choice, search, copying rules between methods.<\/li>\n<li>Translation ready (text domain <code>smartdisain-conditional-checkout-rules<\/code>).<\/li>\n<\/ul>","raw_excerpt":"Hide or require WooCommerce checkout fields by shipping method, and disable shipping methods by shipping class.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/392614","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=392614"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/teetb"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=392614"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=392614"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=392614"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=392614"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=392614"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=392614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}