
Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on March 7, 2023, 11:28
Hello
Unfortunately, we do not have such information.
Please read this - https://currency-switcher.com/woocs-labs
Maybe this code will help:
add_filter( 'yith_wapo_get_addon_price', function($price, $do, $price_method, $price_type, $index){
if ($price) {
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$price = $WOOCS->woocs_exchange_value(floatval($price));
}
}
}
return $price;
},10, 5);
add_filter( 'yith_wapo_total_item_price', function($cart_item_price){
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed && $cart_item_price) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$cart_item_price = $cart_item_price / $rate;
}
}
}
return $cart_item_price;
} );
Hello
Unfortunately, we do not have such information.
Please read this - https://currency-switcher.com/woocs-labs
Maybe this code will help:
add_filter( 'yith_wapo_get_addon_price', function($price, $do, $price_method, $price_type, $index){
if ($price) {
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$price = $WOOCS->woocs_exchange_value(floatval($price));
}
}
}
return $price;
},10, 5);
add_filter( 'yith_wapo_total_item_price', function($cart_item_price){
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed && $cart_item_price) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$cart_item_price = $cart_item_price / $rate;
}
}
}
return $cart_item_price;
} );