Viewing 3 replies - 1 through 3 (of 3 total)
  • Found this tip from this site (scroll down to “Alter the default state and country at the checkout”)
    https://www.pootlepress.com/2014/04/100-woocommerce-tips-tricks/

    /**
    * Manipulate default state and countries
    *
    * Code goes in your theme functions.php file, and change the XX to preferred country code
    */
    add_filter( 'default_checkout_country', 'change_default_checkout_country' );
    add_filter( 'default_checkout_state', 'change_default_checkout_state' );
    function change_default_checkout_country() {
    return 'XX'; // country code
    }
    function change_default_checkout_state() {
    return 'XX'; // state code
    }
    Thread Starter the818studios

    (@the818studios)

    Unfortunately I couldn’t get it to work :/ the code just kept showing up in my header for some reason. I can assure you I wasn’t posting it in the header.php file thought hahah.

    Thread Starter the818studios

    (@the818studios)

    AH my bad, it worked!!!

    But still not in the calculate shipping area.. Any ideas there??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘RESORTING Countries in Drop Down Menu’ is closed to new replies.