was successfully added to your cart.

How to make the WooCommerce State Field Not Required

WooCommerce defaults to making the “State” field in the checkout a required field.

This might be useful if you ship overseas from New Zealand, but as you’ll imagine – “State” doesn’t apply to New Zealand addresses.

woocommerce new zealand

For NZ WooCommerce installs: make the State field not required

There are some plugins around that you can use to alter the checkout fields in WooCommerce. ┬áThese can be really helpful if you’re needing to add additional fields or alter a lot of the checkout fields to suit a customise online store.

However, if it’s just the “State” field that needs to become options, rather than required, you might like to try using this code:

* WooCommerce Extra Feature
* --------------------------
* Make "state" field not required on checkout

add_filter( 'woocommerce_billing_fields', 'woo_filter_state_billing', 10, 1 );
add_filter( 'woocommerce_shipping_fields', 'woo_filter_state_shipping', 10, 1 );

function woo_filter_state_billing( $address_fields ) {
$address_fields['billing_state']['required'] = false;
return $address_fields;

function woo_filter_state_shipping( $address_fields ) {
$address_fields['shipping_state']['required'] = false;
return $address_fields;

Find it here: https://gist.github.com/corsonr/6129163

Leave a Reply