{"id":168640,"date":"2023-01-27T13:56:44","date_gmt":"2023-01-27T13:56:44","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/conditional-logic-for-woo-product-add-ons\/"},"modified":"2025-12-26T22:14:30","modified_gmt":"2025-12-26T22:14:30","slug":"conditional-logic-for-woo-product-add-ons","status":"publish","type":"plugin","link":"https:\/\/km.wordpress.org\/plugins\/conditional-logic-for-woo-product-add-ons\/","author":20168556,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.2.2","stable_tag":"2.2.2","tested":"6.9.4","requires":"5.0","requires_php":"7.2","requires_plugins":null,"header_name":"Conditional Logic for Woo Product Add-Ons","header_author":"Meow Crew","header_description":"Add conditional logic for your Product Add-ons to show or hide certain fields based on other fields' values or states (eg, show Field \u0425 when First Option is selected in Field Y).","assets_banners_color":"ffffff","last_updated":"2025-12-26 22:14:30","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/meow-crew.com\/plugin\/conditional-logic-for-woocommerce-product-add-ons","header_author_uri":"https:\/\/meow-crew.com","rating":4,"author_block_rating":0,"active_installs":500,"downloads":12048,"num_ratings":4,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"meowcrew","date":"2023-01-27 13:56:26"},"1.1.0":{"tag":"1.1.0","author":"meowcrew","date":"2023-04-20 21:01:38"},"1.2.0":{"tag":"1.2.0","author":"meowcrew","date":"2023-06-20 14:55:45"},"1.2.1":{"tag":"1.2.1","author":"meowcrew","date":"2023-07-05 15:51:36"},"2.0.0":{"tag":"2.0.0","author":"meowcrew","date":"2023-07-26 22:16:34"},"2.1.0":{"tag":"2.1.0","author":"meowcrew","date":"2023-11-16 10:21:40"},"2.1.1":{"tag":"2.1.1","author":"meowcrew","date":"2023-12-12 13:22:57"},"2.1.2":{"tag":"2.1.2","author":"meowcrew","date":"2024-02-01 21:34:16"},"2.1.3":{"tag":"2.1.3","author":"meowcrew","date":"2024-06-03 13:46:44"},"2.1.4":{"tag":"2.1.4","author":"meowcrew","date":"2024-08-28 21:16:15"},"2.1.5":{"tag":"2.1.5","author":"meowcrew","date":"2024-10-10 17:16:27"},"2.1.6":{"tag":"2.1.6","author":"meowcrew","date":"2024-11-01 13:46:01"},"2.1.7":{"tag":"2.1.7","author":"meowcrew","date":"2025-04-20 10:09:52"},"2.1.8":{"tag":"2.1.8","author":"meowcrew","date":"2025-06-17 13:14:07"},"2.2.0":{"tag":"2.2.0","author":"meowcrew","date":"2025-11-11 13:15:21"},"2.2.1":{"tag":"2.2.1","author":"meowcrew","date":"2025-11-27 15:59:28"},"2.2.2":{"tag":"2.2.2","author":"meowcrew","date":"2025-12-26 22:14:30"}},"upgrade_notice":[],"ratings":{"1":1,"2":0,"3":0,"4":0,"5":3},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2855869,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2855869,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2855869,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2855869,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.2.0","1.2.1","2.0.0","2.1.0","2.1.1","2.1.2","2.1.3","2.1.4","2.1.5","2.1.6","2.1.7","2.1.8","2.2.0","2.2.1","2.2.2"],"block_files":[],"assets_screenshots":{"screenshot-1.gif":{"filename":"screenshot-1.gif","revision":2855869,"resolution":"1","location":"assets","locale":""},"screenshot-10.png":{"filename":"screenshot-10.png","revision":2943923,"resolution":"10","location":"assets","locale":""},"screenshot-2.gif":{"filename":"screenshot-2.gif","revision":2943923,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2943923,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":2943923,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":2943923,"resolution":"5","location":"assets","locale":""},"screenshot-6.png":{"filename":"screenshot-6.png","revision":2943923,"resolution":"6","location":"assets","locale":""},"screenshot-7.png":{"filename":"screenshot-7.png","revision":2943923,"resolution":"7","location":"assets","locale":""},"screenshot-8.png":{"filename":"screenshot-8.png","revision":2943923,"resolution":"8","location":"assets","locale":""},"screenshot-9.png":{"filename":"screenshot-9.png","revision":2943923,"resolution":"9","location":"assets","locale":""}},"screenshots":{"1":"How conditional fields work on product page","2":"Premium feature: display field based on selected variant","3":"How to add Conditional logic to add-ons field","4":"Premium feature: show Product Add-ons fields only when specific variation selected","5":"Dependencies for fields used as conditions","6":"Two types - if all rules match or any (when condition works)","7":"Condition types for Multiple choice and Checkboxes types of field","8":"Condition types (relations) for text fields","9":"Condition types for File upload type of field","10":"Condition types for numeric types of fields"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[65790,286,163452,163037,159389],"plugin_category":[45],"plugin_contributors":[78154,206685],"plugin_business_model":[],"class_list":["post-168640","plugin","type-plugin","status-publish","hentry","plugin_tags-product-add-ons","plugin_tags-woocommerce","plugin_tags-woocommerce-product-addons","plugin_tags-woocommerce-product-fields","plugin_tags-woocommerce-product-options","plugin_category-ecommerce","plugin_contributors-freemius","plugin_contributors-meowcrew","plugin_committers-meowcrew","plugin_support_reps-meowsupport"],"banners":{"banner":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/banner-772x250.png?rev=2855869","banner_2x":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/banner-1544x500.png?rev=2855869","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/icon-128x128.png?rev=2855869","icon_2x":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/icon-256x256.png?rev=2855869","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-1.gif?rev=2855869","caption":"How conditional fields work on product page"},{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-2.gif?rev=2943923","caption":"Premium feature: display field based on selected variant"},{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-3.png?rev=2943923","caption":"How to add Conditional logic to add-ons field"},{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-4.png?rev=2943923","caption":"Premium feature: show Product Add-ons fields only when specific variation selected"},{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-5.png?rev=2943923","caption":"Dependencies for fields used as conditions"},{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-6.png?rev=2943923","caption":"Two types - if all rules match or any (when condition works)"},{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-7.png?rev=2943923","caption":"Condition types for Multiple choice and Checkboxes types of field"},{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-8.png?rev=2943923","caption":"Condition types (relations) for text fields"},{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-9.png?rev=2943923","caption":"Condition types for File upload type of field"},{"src":"https:\/\/ps.w.org\/conditional-logic-for-woo-product-add-ons\/assets\/screenshot-10.png?rev=2943923","caption":"Condition types for numeric types of fields"}],"raw_content":"<!--section=description-->\n<p>Conditional Logic for WooCommerce Product Add-Ons is an extension to the official  <strong><a href=\"https:\/\/woocommerce.com\/products\/product-add-ons\/\">WooCommerce Product Add-Ons plugin<\/a><\/strong>. With the help of this extension, you can set up conditional logic for Add-ons fields to either show or hide them based on what the user chooses, write or upload in other fields. Also you can determine to display add-ons fields only for specific product variations.<\/p>\n\n<p>[youtube https:\/\/youtu.be\/R6_Fj8WUDBs]<\/p>\n\n<p>Important links:\n<strong><a href=\"https:\/\/meow-crew.com\/plugin\/conditional-logic-for-product-add-ons\">Premium Version Page<\/a><\/strong> | <strong><a href=\"http:\/\/conditional.meow-crew.com\/demo\/\">Demo for Plugin Testing<\/a><\/strong> | <strong><a href=\"https:\/\/meow-crew.com\/documentation\/conditional-logic-for-woocommerce-product-add-ons-documentation\">Plugin Documentation<\/a><\/strong><\/p>\n\n<p>Conditional Logic is designed to work with any field of Product Add-ons, and each field can have its own rules. Fields for which you set conditions can be shown or hidden if Any or All requirements are met. Conditions - set of rules of what the user (your customer) should choose, write or define in other fields. Let's say you offer two types of Gift Wrap options (Free and paid), and you'd like to offer an 'Add a message' service to the Paid option only - then you set the 'Short text' field to be visible only when the customer chose the Paid option.\nIn the Premium version of the plugin you can also add conditions to <strong>show Product Add-ons field only when user select specific Product Variation<\/strong>. This feature can work alone or you can combine it with another conditions based on other add-ons fields output.<\/p>\n\n<p>Types of conditions depend on the kind of field you use as the condition.<\/p>\n\n<p><strong>Multiple choice and Checkboxes<\/strong> types can be conditioned as:\nIs checked - when the customer selects the needed option\nIs not checked - when the customer selects or checks anything besides the specified option<\/p>\n\n<p><strong>Short Text and Long Text<\/strong> have the following condition types:\nIs - text entered by a customer fully complies with your value\nIs not - text entered by a customer is not the same as your value\nIs empty - the customer does not enter any text\nIs not empty - the customer enters any text\nText contains - text entered by the customer contains something specific anywhere in the text\nText does not contain - text entered by the customer does not contain what you specified anywhere in the text\nText starts with - text entered by the customer starts with anything specific\nText ends with - text entered by the customer ends with anything specific<\/p>\n\n<p><strong>File upload<\/strong> field type may have the following logic:\nIs selected - if the customer has chosen a file to upload\nIs not selected - if the customer has not chosen a file to upload yet<\/p>\n\n<p><strong>Customer Defined Price and Quantity<\/strong> are numeric types of fields, and their conditions may be:\nIs - price entered by customer or selected quantity is equal to your value\nIs not - price entered by customer or quantity is anything besides the value you set\nIs greater than - price entered by customer or quantity is greater than the value\nIs less than - price entered by customer or quantity is less than the value\nIs greater than or equal - price entered by customer or quantity is greater than or equal to the value\nIs less than or equal - price entered by customer or quantity is less than or equal to the value<\/p>\n\n<p>Those conditions are available to you in the general add-ons section as well as on the product level.<\/p>\n\n<p>Note: you should have <strong><a href=\"https:\/\/woocommerce.com\/products\/product-add-ons\/\">WooCommerce Product Add-Ons plugin<\/a><\/strong> installed and configured.\nYou can find detailed instructions on how to hide and show WooCommerce Product Add-On options here in <strong><a href=\"https:\/\/meow-crew.com\/documentation\/conditional-logic-for-woocommerce-product-add-ons-documentation\">plugin's documentation<\/a><\/strong><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the \\'\/wp-content\/plugins\/conditional-logic-for-woo-product-add-ons\\' directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the \\'Plugins\\' screen in WordPress<\/li>\n<li>To design conditionals to your Add-ons' fields, go to products with addons (if you have them separately for each product) or to Products &gt; Add-ons &gt; choose Add-ons Group<\/li>\n<li>Click on the 'Conditional logic' checkbox in the field for each you want to add conditions<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='what%20addons%20plugins%20can%20be%20used%20along%20with%20this%20conditional%20logic%3F'><h3>What addons plugins can be used along with this conditional logic?<\/h3><\/dt>\n<dd><p>The Conditional Logic for WooCommerce Product Add-ons is designed to work only with official Product Add-ons. You won't be able to set up conditional logic without that plugin and with any other plugin of that type.<\/p><\/dd>\n<dt id='how%20to%20show%20product%20add-ons%20field%20only%20when%20specific%20variant%20%28e.g.%20red%20cap%20for%20red%20hoodie%29%20is%20selected%3F'><h3>How to show product add-ons field only when specific variant (e.g. red cap for red hoodie) is selected?<\/h3><\/dt>\n<dd><p>When you enable Conditional Logic for field, you will find Variations section. If you leave it empty - this field will be shown for every product variation. If you need to show the field only for specific variations - click on the field and select variations of the product, for which it will be displayed.<\/p><\/dd>\n<dt id='is%20there%20any%20type%20of%20field%20conditional%20logic%20cannot%20be%20applied%20to%3F'><h3>Is there any type of field conditional logic cannot be applied to?<\/h3><\/dt>\n<dd><p>Conditional logic can be applied to any default Product Add-ons field. As well as, all of the fields and their options can be used as conditionals.<\/p><\/dd>\n<dt id='are%20there%20any%20limits%20to%20the%20number%20of%20conditions%20set%20to%20one%20field%3F'><h3>Are there any limits to the number of conditions set to one field?<\/h3><\/dt>\n<dd><p>Yep, in community version it's limited to one condition. In premium version you can add as many conditions as you need.<\/p><\/dd>\n<dt id='when%20trying%20to%20add%20the%20conditional%20logic%2C%20i%20see%20an%20error%20saying%20please%20update%20%28re-save%29%20the%20post%20to%20set%20up%20conditional%20logic'><h3>When trying to add the conditional logic, I see an error saying Please update (re-save) the post to set up conditional logic<\/h3><\/dt>\n<dd><p>That means you have not yet updated the add-on or product. Conditions need to assign a special slug to each field and its options, and that happens only when you update the add-on or product after installing the plugin.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>2025-12-26 \u2013 version 2.2.2\n* Fix: Fix cart validation for WooCommerce store API<\/p>\n\n<p>2025-11-27 \u2013 version 2.2.1\n* Update: Freemius to the latest version.\n* Fix: Fix issue with the required fields.<\/p>\n\n<p>2025-11-10 \u2013 version 2.2.0\n* Updated: Freemius SDK to the latest version\n* New: Frontend script is now minimized\n* Fix: Clear image selection when field is hidden\n* Fix: Default value for multiple selection\n* Fix: Minor CSS fixes<\/p>\n\n<p>2025-05-17 \u2013 version 2.1.8\n* New: Conditional logic for datepicker field\n* Updated: Freemius SDK\n* Updated: Bump WordPress version compatibility<\/p>\n\n<p>2025-04-20 \u2013 version 2.1.7\n* Updated: Freemius SDK\n* Updated: Bump WordPress version compatibility<\/p>\n\n<p>2024-11-01 \u2013 version 2.1.6\n* Updated: Freemius version 2.9.0<\/p>\n\n<p>2024-10-10 \u2013 version 2.1.5\n* New: Bundle products compatibility\n* Fix: UI fixes\n* Updated: Woo 9.3 version compatibility\n* Updated: Woo Product Add-ons 7.1 version compatibility<\/p>\n\n<p>2024-08-30 \u2013 version 2.1.4\n* New: Composite products compatibility\n* Fix: str_replace() deprecated warning\n* Fix: UI fixes\n* Fix: Variations list for current product in the conditions by variations\n* Updated: Woo 9.2 version compatibility\n* Updated: Woo Product Add-ons 7.0 version compatibility<\/p>\n\n<p>2024-06-03 - version 2.1.3\n* Fix: Fatal error when previewing block themes\n* Updated: Woo 8.9.0 version compatibility\n* Updated: Freemius update<\/p>\n\n<p>2024-02-01 - version 2.1.2\n* Fix: Add to cart button action, when required field is hidden under conditions\n* Updated: Woo Product Add-ons 6.6 version compatibility<\/p>\n\n<p>2023-12-12 - version 2.1.1\n* Fix: Required field (radio buttons) optional when hidden\n* Fix: Not displaying conditional logic fields to global add-ons after adding and re-saving<\/p>\n\n<p>2023-11-16 - version 2.1.0\n* Fix: Make required field (checkbox) optional when hidden\n* Fix: Product name for variations with 3 or more attributes\n* Updated: Woo Product Add-ons 6.5 version compatibility\n* Updated: Woo 8.2.2 version compatibility\n* Updated: Woo Cart and Checkout blocks compatibility\n* Updated: WordPress 6.4.1 version compatibility<\/p>\n\n<p>2023-07-26 - version 2.0.0\n* New feature: Conditions based on selected product variation\n* Updated: WooCommerce Product Add-ons version compatibility<\/p>\n\n<p>2023-07-05 - version 1.2.1\n* Updated Freemius SDK to the latest version<\/p>\n\n<p>2023-06-17 - version 1.2.0\n* New feature: All required fields will stay optional if those fields are hidden \n* HPOS compatibility<\/p>\n\n<p>2023-04-20 - version 1.1.0\n* WooCommerce Product Add-ons 6x version compatibility\n* Minor UI improvements<\/p>\n\n<p>2023-01-10 - version 1.0.0\n* Initial release<\/p>","raw_excerpt":"Show or hide certain fields of the WooCommerce Product Addons based on other fields&#039; values or states (eg, show field X when option Y is selected &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/168640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=168640"}],"author":[{"embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/meowcrew"}],"wp:attachment":[{"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=168640"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=168640"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=168640"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=168640"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=168640"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=168640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}