How do I remove fields on the Woocommerce Checkout page?
I read on this page that it can be done with a filter – tried it but it didn’t work (I changed order_comments
by billing_phone
which is one of the fields I’d like to hide.
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
unset($fields['order']['order_comments']);
return $fields;
}
How can I hide the telephone field, for example? Thanks
2
Answers
That maybe?
You can hide the phone field with this filter:
Be sure to add this in the file function.php of your current theme.