How to Get Shipping Rates with WooCommerce DHL Express Plugin for Cities with no ZIP Code

This is a business case related to requests from various customers using ELEX WooCommerce DHL Express / eCommerce / Paket Shipping Plugin with Print Label

The problem

The DHL plugin provides real-time rates with the help of DHL API. DHL API requires various destination address fields such as Country, State, City, and Zip Code to provide the rates. But some of our customers reported that they are not getting the correct shipping rates or no shipping rates for some UAE cities, as UAE has no zip code fields and DHL was not able to provide the rates for these few cities.

Arriving at a solution

The basic solution was to provide WooCommerce flat rates for the UAE region and generate a label through the backend. But this required a lot of manual effort and was not a financially viable solution. So, our product development team came up with a solution, which can be implemented easily and is a perfect solution on the basis of shipping charges.

In this case study, you will get to know how we helped our customers to ship using DHL to the UAE region without any trouble. Please see the below screenshot where you can see that we are not getting any DHL rates for Nad Al Hammar city in Dubai.

As per the screenshot, we are not getting any rates. So, we have added the below code snippet in the functions.php file of the theme folder to take State as City to get the rates.

add_filter('elex_dhl_send_state_as_city_to_api','elex_dhl_send_state_as_city_to_api_fun');
function elex_dhl_send_state_as_city_to_api_fun () {
return array('AE');
}

In the above code snippet, you can see that we have added the United Arab Emirates (AE). Like this, you can add other countries to get the rates for cities that do not have a zip code.

After adding the code snippet, we are getting the rates for Nad Al Hammar. See the below image:

This way, we have solved this critical shipping case for our UAE customers. Now they are shipping successfully with our plugin.

Please visit the Product Page of ELEX WooCommerce DHL Express / eCommerce / Paket Shipping Plugin with Print Label to find the full set of features and capabilities.

To know what our customers are talking about WooCommerce DHL shipping plugin, please check customer reviews.

Popular Tags

Blog Business Case Code Snippet Documentation ELEX Address Validation & Google Address Autocomplete Plugin for WooCommerce ELEX Amazon Payments Gateway for WooCommerce ELEX Authorize.net Payment Gateway for WooCommerce ELEX Bulk Edit Products, Prices & Attributes for WooCommerce ELEX Dynamic Pricing and Discounts Plugin for WooCommerce ELEX EasyPost Auto-Generate & Email Labels Add-On ELEX EasyPost Shipping Method Plugin for WooCommerce ELEX Google Product Feed Plugin ELEX Hide WooCommerce Shipping Methods Plugin ELEX Minimum Order Amount for WooCommerce ELEX ShipEngine Multi-Carrier Shipping & Label Printing Plugin for WooCommerce ELEX Stamps.com Shipping Plugin with USPS Postage for WooCommerce ELEX Stamps.com USPS Auto-Generate & Email Labels Add-On ELEX WooCommerce Australia Post Bulk Label Printing Add-On ELEX WooCommerce Australia Post Shipping Plugin with Print Label & Tracking ELEX WooCommerce Catalog Feed for Facebook & Instagram ELEX WooCommerce Catalog Mode, Wholesale & Role Based Pricing ELEX WooCommerce Choose Your Delivery Date Plugin ELEX WooCommerce DHL Express / eCommerce / Paket Shipping Plugin with Print Label ELEX WooCommerce DHL Express Bulk Label Printing Add-On ELEX WooCommerce Discount per Payment Method Plugin ELEX WooCommerce EasyPost Bulk Label Printing Add-On ELEX WooCommerce EasyPost Return Label Add-On ELEX WooCommerce Name Your Price Plugin ELEX WooCommerce Product Price Custom Text (Before & After Text) and Discount Plugin ELEX WooCommerce Stamps.com Bulk Label Printing Add-On ELEX WooCommerce USPS Shipping Plugin with Print Label ELEX WooCommerce Request a Quote plugin for WooCommerce ELEX WordPress Embed YouTube Video Gallery FAQ Getting Started Knowledge Base Open Source HelpDesk & Customer Support Ticketing System – Simple & Flexible Plugin Integrations Shipping Plugins Uncategorized WooCommerce WooCommerce Multi-Vendor Support for ELEX Shipping Plugins WSChat - WordPress Live Chat Plugin WSDesk - WordPress Helpdesk Plugin WSDesk SMS Notification Add-On