• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Flexible Shipping - All in One Shipping for WooCommerce

  • Plugins
  • Docs
  • Support
  • Blog
  • My account
  • 0

Join more than 10,000 others

WooCommerce tips, Flexible Shipping news - right to your inbox.

Bartosz Gajewski

How to add a United Arab Emirates city in WooCommerce?

Updated: December 31, 2020 / Guides, Shipping

WooCommerce is a great solution for online shops but has its limitations. Shipping based on shipping zones and postcodes works well in most countries. But what if a country doesn’t have postcodes? In this article, you will learn how to add a United Arab Emirates city in WooCommerce.

The United Arab Emirates has no system of postal codes. Instead, they use registered PO Boxes, which are assigned individually. Other Gulf and Middle East countries also follow the same system. Shipping in WooCommerce is mainly based on postcodes, so shipping to individual cities in the UAE can be very problematic. Yes, in WooCommerce there is an option to choose the United Arab Emirates as a separate shipping zone. But what if the cost of shipping is different for different regions or cities? The best option is to add them yourself.

Would you like to find out more about shipping zones in WooCommerce - check out our ultimate guide

How to add a United Arab Emirates city in WooCommerce?

This is not about interfering with the WooCommerce code. The only thing that’s WooCommerce included is Countries and states/provinces for some countries. So we will use states to add cities. Especially since WooCommerce provides a filter named woocommerce_states that we can use.

All you have to do is to add a special code in the theme’s functions.php file or use an additional plugin like Code Snippets. Here’s an example code,  which I will cover in detail.

Basically, that code adds new states to WooCommerce. In my example, these are the biggest cities in the United Arab Emirates. You can also add new cities, just by adding new states. If you want to add Al Ain, just add a 'AA' => __( 'Al Ain', 'woocommerce' ) inside $states array.

How does it work?

It will add new states to the United Arab Emirates. This way, if you’ll go to WooCommerce > Settings > Shipping and add a new Shipping Zone, you will be able to select cities as a shipping zone.

United Arab Emirates cities in WooCommerce

The same will happen for your clients. On the checkout page or shopping cart, they will be able to select United Arab Emirates cities in the State / County dropdown field.

United Arab Emirates cities in the checkout page

Examples of usage

WooCommerce shipping to Dubai

If you want to offer shipping to only one city, like Dubai, you can add a Shipping Zone restricted to only that one city.

WooCommerce shipping to Dubai

Different shipping cost for each city

If you want to offer different shipping fees for each city, you can do it in two ways. First, you can add a separate shipping zone for each city and add a shipping method with a different fee inside all the zones. The second and much more convenient way is to use the Flexible Shipping Locations Add-on. It will allow you to configure it all in one shipping method.

United Arab Emirates cities in WooCommerce with Flexible Shipping Locations

Flexible Shipping Locations WooCommerce £29

Extend Flexible Shipping with custom locations and create shipping costs based on weight, order totals or item count.

Add to cart or View Details
WP Desk
Plugins used by 174,429+ shops
Last Updated: 2021-02-04
Works with WooCommerce 4.9.0 - 5.2.x
Tweet

2 minutes read794 views

Bartosz Gajewski

Content Specialist in WP Desk. He tries to increase the number of plugin users with useful content. Privately an enthusiast of mountains and European cinema.

Flexible Shipping

The most flexible Table Rate Shipping plugin for WooCommerce. Create any shipping scenario based on totals, weight, quantity, shipping classes and more.

Learn more →

Join more than 10,000 others

WooCommerce tips, Flexible Shipping news - right to your inbox.

Home › How to add a United Arab Emirates city in WooCommerce?

Footer

Flexible Shipping

The most flexible Table Rate Shipping plugin for WooCommerce. Create any shipping scenario based on totals, weight, quantity, shipping classes and more.

© 2021 A WP Desk WP Desk Shipment Secured by Comodo

Company

  • Blog

Products

  • Plugins
  • Docs
  • Support

Legal

  • Terms & Conditions
  • Refund Policy
  • Support Policy
  • Privacy Policy