0

I'm using plugin like FunnelKit (or cartflow) to make custom checkout page. So I try to hide some checkout field depending on some critireas, so I need to do it through the code and not from the FunnelKit or cartflow dashboard. So I added this code to my function.php

`add_filter( 'woocommerce_billing_fields', 'remove_checkout_fields', 100 );
function remove_checkout_fields( $fields ) {
unset( $fields['billing_postcode'] );
return $fields;
}`

I used also :

unset($fields['billing']['billing_postcode']);

and also this method :

add_filter( 'woocommerce_checkout_fields', 'remove_checkout_fields' );

but it doesn't work.

when I disable the checkout from the plugin and come back to the regular woocommerce checkout, in this case it's working and the field is removed

any ideas how I can make this works ?

thank you

martin
  • 11
  • 2
  • Try to see if this thread can help you: https://stackoverflow.com/questions/46299376/woocommerce-conditional-custom-checkout-fields – Michele Apr 14 '23 at 09:26

0 Answers0