PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Exchange rate applied twice on base price in the cart.

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

It seems like exchange rate gets multiplied twice with my base currency price on the cart page and in the cart widget dropdown.

My base currency is Euro, when I switch to USD conversion rate is applied twice to the euro price:

Conversion rate : EUR/USD 1.1136
1 * 11.65 = 11.65 EUR - base [OK]
1.1136 * 11.65 = 12.97 USD - cart widget title / site [OK]
1.1136 * 1.1136 * 11.65 = 14.44 USD - cart widget dropdown / cart [THIS IS WRONG]

I have checked my themes cart.php WooCommerce file to see if the woocommerce_cart_item_price filter is applied twice for some reason, but it doesn't differ from the default WooCommerce cart file. Here's the relevant code:

<td class="product-price" data-title="<?php esc_attr_e( 'Price', 'woocommerce' ); ?>">
<?php
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
?>
</td>

Here's a screenshot of how it is when I'm on my base currency and what happens when I switch to USD:

Euro Price OK

And here's example of the same product when switched to USD currency:

USD Currency BAD

Hello

This is incompatible with third-party software.

Try  to  change  this  code:

if (WC()->cart->display_prices_including_tax() ) {
$product_price = wc_get_price_including_tax( $product );
} else {
$product_price = wc_get_price_excluding_tax( $product );
}

if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$product_price = $product_price / $rate;
}
}
}

echo apply_filters( 'woocommerce_cart_item_price', wc_price( $product_price ), $cart_item, $cart_item_key );