Created
April 22, 2022 08:12
-
-
Save bradleysa/787baa1f4b5d61885069535a6538b41d to your computer and use it in GitHub Desktop.
WC: default state and country
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
add_filter( 'default_checkout_country', 'change_default_checkout_country' ); | |
add_filter( 'default_checkout_state', 'change_default_checkout_state' ); | |
function change_default_checkout_country() { | |
return 'US'; // country code | |
} | |
function change_default_checkout_state() { | |
return 'CA'; // state code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment