State not Required for Billing or Shipping
-
WooCommerce is not requiring the billing or shipping state to be selected in order for the order to go through. I’m getting orders with no State. I’ve search numerous places and tried a bunch of different functions, but none of them work. I’ve even tried them in different places, i.e. code snippets, child theme functions.php file, and wpcodebox. This is what I’m using now, that I edited based on one I saw on this support thread, and it doesn’t work either.
add_filter( 'woocommerce_default_address_fields', 'bbloomer_required_woo_checkout_fields' ); function bbloomer_required_woo_checkout_fields( $address_fields ) { $address_fields['state']['required'] = true; return $address_fields; }
Thanks
The page I need help with: [log in to see the link]
- The topic ‘State not Required for Billing or Shipping’ is closed to new replies.