Viewing 1 replies (of 1 total)
  • Thread Starter velolabor

    (@velolabor)

    Just to add, I’ve found the source for this error.

    It’s due to a function removing the “state” adress field.

    // Hook in
    add_filter( 'woocommerce_default_address_fields' , 'custom_override_checkout_fields' );
    
    // Our hooked in function - $fields is passed via the filter!
    function custom_override_checkout_fields( $fields ) {
         unset($fields['state']);
    
         return $fields;
    }

    The thing is the code works, but I get a JS error. Is there any workaround, because asking for the state / kanton in Switzerland doesn’t really make any sense.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Problems with: address-i18n.min.js’ is closed to new replies.