Hello
What do you use to switch currency depending on the language?
Custom code?
Hello good, I have created a code where I add an item in the cart and it does not make the conversion.
This is my code:
add_filter( ‘woocommerce_cart_calculate_fees’,’add_engraving_fees’, 10, 1 );
function add_engraving_fees( $cart ) {
global $woocommerce;
global $product;
$peso= $woocommerce->cart->cart_contents_weight . ‘ ‘ . get_option(‘woocommerce_weight_unit’);
if ($peso < 1001){
$suma = 0.50;
}elseif($peso < 2001){
$suma = 62;
}elseif($peso < 3001){
$suma= 82;
}elseif($peso < 5001){
$suma= 175;
}elseif($peso < 10001){
$suma= 275;
}else{
$suma=275;
}
$cart->add_preci( ‘Envio Internacional ‘ . ‘ Por Kilo: (‘ . $woocommerce->cart->cart_contents_weight . ‘ ‘ . get_option(‘woocommerce_weight_unit’) . ‘)’ , $suma );
}`
Hi again, we are using your code for TranslatePress: https://currency-switcher.com/switch-currency-with-language-change/ We have moved the testing to: https://bylo.hartmanncreate.com/
The issue remains: We have setup the currency to change, when you change language. Works great on the cart page. But on the front page and other pages the amout in the header stays the same when you change the currency/language.
Hi mediawebster
The option was already set to caching-plugin. I’ve changed to PHP session, but when I test I still have the issue with the currency not changing amout.
Hello
I did a test – https://share.stackovergo.com/video/v20211105160653.mp4 – it works correctly
Perhaps you mean some kind of third-party prices
Hi again,
Thank you for testing.
But your test has no amount. It’s the amount that stays the same, the currency type (EUR or DKK) changes, but the amount stays the same.
It does not do that, if you are in the cart or checkout, then the amount changes when you change language.
Hello
You mean mini-cart
Try to use standard woo cart widget
Hi, I’m using the standard Elementor Woo cart widget. This has a mini-cart, but it is the standard widget from Elementor.
We can’t be the only ones with this issue.