Created
July 16, 2012 17:18
-
-
Save mikejolley/3123855 to your computer and use it in GitHub Desktop.
WooCommerce - Malaysia 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. | |
*/ | |
add_filter( 'woocommerce_states', 'malaysia_woocommerce_states' ); | |
function malaysia_woocommerce_states( $states ) { | |
$states['MY'] = array( | |
'JHR' => __('Johor', 'woocommerce') , | |
'KDH' => __('Kedah', 'woocommerce') , | |
'KTN' => __('Kelantan', 'woocommerce') , | |
'MLK' => __('Melaka', 'woocommerce') , | |
'NSN' => __('Negeri Sembilan', 'woocommerce') , | |
'PHG' => __('Pahang', 'woocommerce') , | |
'PRK' => __('Perak', 'woocommerce') , | |
'PLS' => __('Perlis', 'woocommerce') , | |
'PNG' => __('Pulau Pinang', 'woocommerce') , | |
'SBH' => __('Sabah', 'woocommerce') , | |
'SWK' => __('Sarawak', 'woocommerce') , | |
'SGR' => __('Selangor', 'woocommerce') , | |
'TRG' => __('Terengganu', 'woocommerce') , | |
'KUL' => __('W.P. Kuala Lumpur', 'woocommerce') , | |
'LBN' => __('W.P. Labuan', 'woocommerce') , | |
'PJY' => __('W.P. Putrajaya', 'woocommerce') | |
); | |
return $states; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment