Conditional fields based on product id
-
Hi,
Please I have used this plugin to remove some of checkout fields and to add other fields, now I want to make the new added fields appear/hide based on product id. I used this code snippet in functions.php
function wc_ninja_remove_checkout_field( $fields ) { unset( $fields['billing_myfield13']['billing_myfield14']['billing_myfield15'] ); return $fields; } add_filter( 'woocommerce_checkout_fields' , 'wc_ninja_remove_checkout_field' );
to hide these three newly added fields, but it doesn’t work. How could I sove this problem??
Thanks in advance
- The topic ‘Conditional fields based on product id’ is closed to new replies.