• In my shop, products are shipped to the Philippines. The shipping checkout information should thus always be based on the Philippines. I need the Country field to be set to Philippines by default. I found this code:

    /**
     * Manipulate default state and countries
     *
     * As always, code goes in your theme functions.php file
     */
    add_filter( 'default_checkout_country', 'change_default_checkout_country' );
    
    function change_default_checkout_country() {
      return 'PH'; // country code
    }

    It works, but it also changes the country to Philippines in the Billing area. I need to prevent that from happening.

    So my question is: how can I set a default country for only the Shipping details? NOT the billing!

    https://wordpress.org/plugins/woocommerce/

  • The topic ‘Default SHIPPING country’ is closed to new replies.