What can we help you with?

How to use the ELEX WooCommerce DHL Shipping plugin with a Currency Switcher plugin?

This article aims to explain how to integrate ELEX WooCommerce DHL Shipping Plugin with Print Label with Currency Switcher for WooCommerce

What is a Currency switcher plugin?

When you sell online and your customer base extends beyond countries, it becomes utmost important to convert your store into a multi-currency one. With the robust Currency Switcher plugin from Aelia, you can choose what are the currency options you would like to give to your customers depending on the countries where you sell.
Then you have the option of selecting the exchange rates for the selected currency from your store’s base currency.
Moreover, when the Geo-location feature of the plugin is activated, the location of your customer is detected when they visit the site and thus, the appropriate currency is directly shown to the customer. Isn’t it amazing?
That’s just not it! It even offers the feature of mapping payment gateways to currencies. And this is necessary because every payment gateway doesn’t support every currency. Thus, mapping the payment gateways would reduce some unnecessary hassle for your customers.

Integration of the ELEX WooCommerce DHL Shipping Plugin with the Currency Switcher plugin.

From the version 3.4.3, DHL Shipping plugin for WooCommerce has been modified and made compatible with the Currency Switcher plugin for WooCommerce. Thanks to the plugin author for helping us with the workaround.
So, now you can save your multi-currency store from any messed-up prices.
After you install and activate both the plugin, make sure to add the following code snippet in your function.php file (Appearance ->Editor -> function.php)

add_filter('wf_dhl_shipping_rates_source_currency', function($shipping_rates_source_currency) {
return 'ZAR';
}, 10, 1);

In the above snippet, the “ZAR” currency has been added, considering that your shop currency is “ZAR” (South African Rand). Similarly, you can modify it as per the shop currency (base currency) you are using.

Why was there a need for this integration?

Without the above code snippet, there might be a possibility of a double conversion in your store because, no matter what your store currency is, DHL always returns rates in USD. But, what if your active currency too is USD? In that case, Currency Switcher would reconvert USD into USD!
And that can definitely create havoc in your store!
Thus, the above code snippet is required to be added to make the DHL to always return the rates in the “Store currency” and let the currency switcher make the right conversion to any active currency.

There’s a situation when you can avoid using the code snippet. When both your store currency and the active currency of the currency switcher is USD

Hope this helped you in setting up your multi-currency store!

 


To explore more details about the plugins, go check out ELEX WooCommerce DHL Express / eCommerce / Paket Shipping Plugin with Print Label.

Read the article for setting up DHL Express understand the plugin, in detail. Or check out the product documentation section for more related articles.

You can also check out other WooCommerce and WordPress plugins in ELEX.

Previous Top 5 Exciting Features of ELEX WooCommerce DHL Express Shipping Plugin
Next How to set up WooCommerce Multi-Vendor Add-On with ELEX WooCommerce DHL Express Plugin with Print Label and Dokan?
You must be logged in to post a comment.