woogists
3/12/2018 - 12:27 PM

[States/counties (not in core)] South Africa

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

/**
 * Code goes in functions.php or a custom plugin.
 */
add_filter( 'woocommerce_states', 'SA_woocommerce_states' );

function SA_woocommerce_states( $states ) {

  $states['ZA'] = array(
				'EC' => __('Eastern Cape', 'woocommerce') ,
				'FS' => __('Free State', 'woocommerce') ,
				'GP' => __('Gauteng', 'woocommerce') ,
				'KZN' => __('KwaZulu-Natal', 'woocommerce') ,
				'LP' => __('Limpopo', 'woocommerce') ,
				'MP' => __('Mpumalanga', 'woocommerce') ,
				'NC' => __('Northern Cape', 'woocommerce') ,
				'NW' => __('North West', 'woocommerce') ,
				'WC' => __('Western Cape', 'woocommerce')
  );

  return $states;
}