• Resolved Sankar

    (@sankarwebstix)


    I’m using the latest version of this plugin. I chose the US as the default country in the field settings but it is not working.

    If I tried to set default country using JS. It conflicts with the state field and its layout is breaking.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Sanesh Acowebs

    (@saneshacodez)

    Hi, to set default checkout billing country you can use the following code from Woocommerce documentation to your functions.php.

    add_filter( 'default_checkout_billing_country', 'awcfe_change_default_checkout_country' );
     
    function awcfe_change_default_checkout_country() {
      return 'US'; 
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Can’t set default value for checkout fields’ is closed to new replies.