Disable billing_state field check out page
-
Hello,
How is it possible that I manage to disable every single billing field in the checkout page except the billing_state field?
add_filter( 'woocommerce_checkout_fields' , 'custom_checkout_fields' ); function custom_checkout_fields( $fields ) { $fields['billing']['billing_postcode']['custom_attributes']['disabled'] = 'disabled'; $fields['billing']['billing_city']['custom_attributes']['disabled'] = 'disabled'; $fields['billing']['billing_state']['custom_attributes']['disabled'] = 'disabled'; return $fields; }
I use the code above… working on every field except the billing_state field.
I allready tried the billing_country field because this is a select field too and maybe it has something to do with that but the billing_country field is disabled too.
Anyone had an idea why this function doesn’t work on my billing_state field in de checkout?
Any suggestions would be welcome because I am a bit lost here.
Kind regards.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Disable billing_state field check out page’ is closed to new replies.