Created
April 30, 2014 14:27
-
-
Save nickburne/848672b60bcce1869ada to your computer and use it in GitHub Desktop.
Alter the default state and country at 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
/** | |
* Manipulate default state and countries | |
* | |
* As always, code goes in your theme functions.php file | |
*/ | |
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment