WOOCS - WooCommerce Currency Switcher

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();
        $def_currency = $WOOCS->default_currency;
        if (isset($currencies['USD']) AND $def_currency !== 'USD') {

            $rate = $currencies['USD']['rate'];
            $rate->{'total_price'} = $rate->{'total_price'} / $rate;
        }
    }
}