Created
September 13, 2015 21:52
-
-
Save UltimateWoo/9bb046aa21d0b8d643b7 to your computer and use it in GitHub Desktop.
Add states to countries that do not include states in WooCommerce core
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 | |
/** | |
* Add custom states to country in WooCommerce (Ex: Nigeria) | |
*/ | |
add_filter( 'woocommerce_states', 'NG_woocommerce_states' ); | |
function NG_woocommerce_states( $states ) { | |
$states['NG'] = array( | |
'SS' => __( 'Some State', 'woocommerce' ), | |
); | |
return $states; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment