Skip to content

Instantly share code, notes, and snippets.

@WillBrubaker
Last active February 6, 2021 07:35
Show Gist options
  • Save WillBrubaker/7e3fa91f9a51eed09d2137b3d4408fa5 to your computer and use it in GitHub Desktop.
Save WillBrubaker/7e3fa91f9a51eed09d2137b3d4408fa5 to your computer and use it in GitHub Desktop.
Add UAE Emirates to WooCommerce
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/
add_filter( 'woocommerce_states', 'add_uae_emirates' );
function add_uae_emirates( $states ) {
$states['AE'] = array(
'AZ' => __( 'Abu Dhabi', 'woocommerce' ),
'AJ' => __( 'Ajman', 'woocommerce' ),
'FU' => __( 'Fujairah', 'woocommerce' ),
'SH' => __( 'Sharjah', 'woocommerce' ),
'DU' => __( 'Dubai', 'woocommerce' ),
'RK' => __( 'Ras Al Khaimah', 'woocommerce' ),
'UQ' => __( 'Umm Al Quwain', 'woocommerce' ),
);
return $states;
}
@rohitramesh5
Copy link

Thank you Mate! you saved my life :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment