Created
August 29, 2025 08:42
-
-
Save webdados/5d6a7fe2ccf15fe88ebd5130627c9f9e to your computer and use it in GitHub Desktop.
Add custom product taxonomies or attributes as conditional rules in Simple Checkout Fields Manager for WooCommerce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add custom product taxonomies or attributes as conditional rules in Simple Checkout Fields Manager for WooCommerce | |
* https://nakedcatplugins.com/product/simple-custom-fields-for-woocommerce-blocks-checkout/ | |
*/ | |
// Example - Add "color" attribute | |
add_filter( 'swcbcf_conditional_cart_product_taxonomies', function( $taxonomies ) { | |
$taxonomies[ 'pa_color' ] = 'Color'; | |
return $taxonomies; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment