WooCommerce: Disabling checkout fields with a filter hook
I have try to disable the "required" property of several checkout fields at the same time using woocommerce_checkout_fields filter hook, with no success. Plugins are not working properly either. This is my code: // 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 ) { $fields['billing']['billing_address_1']['required'] = false; $fields['billing']['billing_address_2']['required'] = false; $fields['billing']['billing_postcode']['required'] = false