Created
June 28, 2012 17:12
-
-
Save mikejolley/3012597 to your computer and use it in GitHub Desktop.
WooCommerce - Manipulate the states
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
/** | |
* Code goes in functions.php or a custom plugin. Replace XX with the country code your changing. | |
*/ | |
add_filter( 'woocommerce_states', 'custom_woocommerce_states' ); | |
function custom_woocommerce_states( $states ) { | |
$states['XX'] = array( | |
'XX1' => 'State 1', | |
'XX2' => 'State 2' | |
); | |
return $states; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was trying to do it without succesful