Created
August 9, 2017 01:41
-
-
Save jfarsen/30e82ebab5ee370cc0f93098b33b95a8 to your computer and use it in GitHub Desktop.
Define a default province at WooCommerce checkout
This file contains hidden or 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
<?php | |
/** | |
* Manipulate default state and countries | |
*/ | |
add_filter( 'default_checkout_state', 'change_default_checkout_state' ); | |
function change_default_checkout_state() { | |
return 'QC'; // state code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment