Add new country to WooCommerce countries list

This is a simple snippet from the wonderful people at WooCommerce, and it does exactly what you would think. Add this snippet to the functions.php file of your theme to add a new country to the WooCommerce countries list.

function woo_add_my_country( $country ) {
   $country["AE-DU"] = 'Dubai';
   return $country;
add_filter( 'woocommerce_countries', 'woo_add_my_country', 10, 1 ); 

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!