WooCommerce DHL Express / eCommerce / Paket Shipping Plugin with Print Label – How to use the DHL shipping plugin with a Currency Switcher plugin?

This article aims to integrate DHL Shipping Plugin for WooCommerce with Currency Switcher for WooCommerce

What is a currency switcher plugin?

When you sell online and 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. Isn’t it amazing?
That’s just not it! It even offers the feature of mapping payment gateways tomers.

Integration of the DHL Shipping plugin for WooCommerce 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 tor -> 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 to USD!
And that can definitely create havoc in your store!
Thus, the above code snippet is required 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!

2 thoughts on “WooCommerce DHL Express / eCommerce / Paket Shipping Plugin with Print Label – How to use the DHL shipping plugin with a Currency Switcher plugin?”

  1. Hi Phillip,

    having 5 lines of code is not really necessary, you only need the code snippet for the shop default currency, for other currency the currency switcher plugin should convert the values without any issues.

    Regards,
    Lorenzo

  2. So if we have 5 currencies and they geolocate, we should have 5 lines in the functions file
    Foe Example

    // DHL rates fro currency switcher

    add_filter(‘wf_dhl_shipping_rates_source_currency’, function($shipping_rates_source_currency) {
    return ‘USD’;
    }, 10, 1);

    add_filter(‘wf_dhl_shipping_rates_source_currency’, function($shipping_rates_source_currency) {
    return ‘AUD’;
    }, 10, 1);

    add_filter(‘wf_dhl_shipping_rates_source_currency’, function($shipping_rates_source_currency) {
    return ‘EUR’;
    }, 10, 1);

    add_filter(‘wf_dhl_shipping_rates_source_currency’, function($shipping_rates_source_currency) {
    return ‘NZD’;
    }, 10, 1);

    add_filter(‘wf_dhl_shipping_rates_source_currency’, function($shipping_rates_source_currency) {
    return ‘CAD’;
    }, 10, 1);

    add_filter(‘wf_dhl_shipping_rates_source_currency’, function($shipping_rates_source_currency) {
    return ‘GDP’;
    }, 10, 1);

Comments are closed.

Scroll to Top