Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

checkout billing state field change to not required

$
0
0

Replies: 0

Hi,

How can I change the billing state field to a not required field? I tried this code but somehow its not working

function panda_custom_billing_fields( $fields ) {
  $fields['billing']['billing_state']['required'] = false;
  return $fields;
}

add_filter( 'woocommerce_checkout_fields', 'panda_custom_billing_fields', 999 );

regards,
dexter


Viewing all articles
Browse latest Browse all 59525

Trending Articles