/** * Adds the UAE emirates to the list of states available at checkout. * * Need a consultation? Find us on Codeable: https://bit.ly/codeable_discount * * @param array states The list of states passed by WooCommerce. * @return array The list of states, including the emirates for the UAE. * @author Aelia */ add_filter('woocommerce_states', function($states) { // Note: the keys of the array may not be correct. I used arbitrary values, // to illustrate the concept $states['AE'] = array( 'AD' => __('Abu Dhabi', 'your_text_domain'), 'DB' => __('Dubai', 'your_text_domain'), 'SH' => __('Sharjah', 'your_text_domain'), 'AJ' => __('Ajman', 'your_text_domain'), 'FJ' => __('Fujairah', 'your_text_domain'), 'RS' => __('Ras al-Khaimah', 'your_text_domain'), 'UM' => __('Umm al-Qaiwain', 'your_text_domain'), ); return $states; });