-
-
Save aadityajs/8235883 to your computer and use it in GitHub Desktop.
WooCommerce - India states
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 | |
/** | |
* Code goes in functions.php or a custom plugin. | |
*/ | |
add_filter( 'woocommerce_states', 'indian_woocommerce_states' ); | |
function indian_woocommerce_states( $states ) { | |
$states['IN'] = array( | |
'AP' => __('Andra Pradesh', 'woocommerce'), | |
'AR' => __('Arunachal Pradesh', 'woocommerce'), | |
'AS' => __('Assam', 'woocommerce'), | |
'BR' => __('Bihar', 'woocommerce'), | |
'CT' => __('Chhattisgarh', 'woocommerce'), | |
'GA' => __('Goa', 'woocommerce'), | |
'GJ' => __('Gujarat', 'woocommerce'), | |
'HR' => __('Haryana', 'woocommerce'), | |
'HP' => __('Himachal Pradesh', 'woocommerce'), | |
'JK' => __('Jammu and Kashmir', 'woocommerce'), | |
'JH' => __('Jharkhand', 'woocommerce'), | |
'KA' => __('Karnataka', 'woocommerce'), | |
'KL' => __('Kerala', 'woocommerce'), | |
'MP' => __('Madhya Pradesh', 'woocommerce'), | |
'MH' => __('Maharashtra', 'woocommerce'), | |
'MN' => __('Manipur', 'woocommerce'), | |
'ML' => __('Meghalaya', 'woocommerce'), | |
'MZ' => __('Mizoram', 'woocommerce'), | |
'NL' => __('Nagaland', 'woocommerce'), | |
'OR' => __('Orissa', 'woocommerce'), | |
'PB' => __('Punjab', 'woocommerce'), | |
'RJ' => __('Rajasthan', 'woocommerce'), | |
'SK' => __('Sikkim', 'woocommerce'), | |
'TN' => __('Tamil Nadu', 'woocommerce'), | |
'TR' => __('Tripura', 'woocommerce'), | |
'UT' => __('Uttaranchal', 'woocommerce'), | |
'UP' => __('Uttar Pradesh', 'woocommerce'), | |
'WB' => __('West Bengal', 'woocommerce'), | |
'AN' => __('Andaman and Nicobar Islands', 'woocommerce'), | |
'CH' => __('Chandigarh', 'woocommerce'), | |
'DN' => __('Dadar and Nagar Haveli', 'woocommerce'), | |
'DD' => __('Daman and Diu', 'woocommerce'), | |
'DL' => __('Delhi', 'woocommerce'), | |
'LD' => __('Lakshadeep', 'woocommerce'), | |
'PY' => __('Pondicherry (Puducherry)', 'woocommerce') | |
); | |
return $states; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment