woogists
3/12/2018 - 12:29 PM

[States/counties (not in core)] Malaysia

[General Snippets][States/counties (not in core)] Malaysia

/**
 * 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;
}