WOOCS - WooCommerce Currency Switcher Professional


DHL Express Commerce

Plugin link: https://dhlexpresscommerce.com/intro/dhl.aspx?ReturnUrl=%2f

To file wp-content\plugins\woocommerce-dhlexpress-services\woocommerce-dhlexpress-services.php add next code:

if (class_exists('WOOCS')) {
    global $WOOCS;
    if ($WOOCS->is_multiple_allowed) {
        $current = $WOOCS->current_currency;
        $currencies = $WOOCS->get_currencies();
        $shipp_currency = $rate->{'currency'};
        $def_currency = $WOOCS->default_currency;
        if (isset($currencies[$shipp_currency]) AND $def_currency !== $shipp_currency) {
            $r = $currencies[$shipp_currency]['rate'];
            $rate->total_price = $rate->total_price / $r;
        }
    }
}