• Resolved wayneg03

    (@wayneg03)


    I have used this code as a workaround for a checkout page bug that prevents shipping being calculated until a county is entered.

    
    add_filter( 'woocommerce_get_country_locale', 'mp_change_locale_field_defaults');
     
    function mp_change_locale_field_defaults($countries) {
        $countries['GB']['state']['required'] = true;
        return $countries;
    }
    

    however when i change the country from uk to germany/france etc this field shows its label but no text box.

    This makes payment progression impossible.

    please help, this is a project ending issue.

    • This topic was modified 4 years, 6 months ago by Yui.
    • This topic was modified 4 years, 6 months ago by Yui. Reason: please use CODE button for code formatting
Viewing 1 replies (of 1 total)
  • The thing is that generally the country is needed to be able to calulate shipping, so its not a bug.

    There’s a setting for the default customer location. You could set this to Geolocation. WC will know what country the user is probably in and shipping should be right most of the time. It will be corrected on checkout if the customer enters a different country.

Viewing 1 replies (of 1 total)
  • The topic ‘Issue with checkout’ is closed to new replies.