Created
February 3, 2017 16:22
-
-
Save shameemreza/ba87f1bcfc9032e1efb8572ad0df3a6c to your computer and use it in GitHub Desktop.
Add states to countries that do not include states in WooCommerce core
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
<?php | |
/** | |
* Add custom states to country in WooCommerce (Ex: Bangladesh) | |
*/ | |
add_filter( 'woocommerce_states', 'BD_woocommerce_states' ); | |
function BD_woocommerce_states( $states ) { | |
$states['BD'] = array( | |
'SS' => __( 'Barandipara', 'woocommerce' ), | |
); | |
return $states; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment