Last active
May 28, 2021 16:03
-
-
Save woogists/8f2adf6a0e7a4e456c8f07900697f9e3 to your computer and use it in GitHub Desktop.
[Frontend Snippets] Change the default state and country on the checkout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Change the default state and country on the checkout page | |
*/ | |
add_filter( 'default_checkout_billing_country', 'change_default_checkout_country' ); | |
add_filter( 'default_checkout_billing_state', 'change_default_checkout_state' ); | |
function change_default_checkout_country() { | |
return 'XX'; // country code | |
} | |
function change_default_checkout_state() { | |
return 'XX'; // state code | |
} |
This appears to not be working anymore after the latest WC updates. Can we please get a update to this Code?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is this still working?