Created
May 8, 2018 17:05
-
-
Save spigotdesign/42caf3fd402e0d78a9b520c924766a0f to your computer and use it in GitHub Desktop.
Change default state on WooCommerce checkout state dropdown
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 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_state() { | |
return 'XX'; // state code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment