
Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on May 23, 2024, 09:58
Hello Ole
Great! Welcome;)
Hello Ole
Great! Welcome;)

skysolution(@skysolution)
47 PostsTopic Author
Customers
Quote from skysolution on May 23, 2024, 12:46
Hi Again Pablo
Have not seen the site (staging.tibladin.dk and also the live site tibladin.dk) used woocommerce product add-on
and tried add this code to site, If I do this the site fail. I have also an answer I we add code like this to the plugin, what happen when plugin come with an update?
The Plugin URL: https://woocommerce.com/products/product-add-ons/
- In file wp-content\plugins\woocommerce-product-addons\includes\class-wc-product-addons-cart.php add next code:
if ($addon AND 'percentage_based' !== $addon AND class_exists('WOOCS')) {
global $WOOCS;
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency AND $WOOCS->is_multiple_allowed) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies;
$addon = $addon * $rate;
}
}
Also in the same file add code:
if (class_exists('WOOCS')) {
global $WOOCS;
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency AND $WOOCS->is_multiple_allowed) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies;
$addon_price = $addon_price * $rate;
}
}
Hi Again Pablo
Have not seen the site (staging.tibladin.dk and also the live site tibladin.dk) used woocommerce product add-on
and tried add this code to site, If I do this the site fail. I have also an answer I we add code like this to the plugin, what happen when plugin come with an update?
The Plugin URL: https://woocommerce.com/products/product-add-ons/
- In file wp-content\plugins\woocommerce-product-addons\includes\class-wc-product-addons-cart.php add next code:
if ($addon AND 'percentage_based' !== $addon AND class_exists('WOOCS')) {
global $WOOCS;
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency AND $WOOCS->is_multiple_allowed) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies;
$addon = $addon * $rate;
}
}
Also in the same file add code:
if (class_exists('WOOCS')) {
global $WOOCS;
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency AND $WOOCS->is_multiple_allowed) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies;
$addon_price = $addon_price * $rate;
}
}

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on May 24, 2024, 09:44
Hello
Perhaps you inserted this code incorrectly or this code does not fit in the new version of a third-party plugin. We can add this plugin to the adaptation queue - https://currency-switcher.com/woocs-labs - and check it
what happen when plugin come with an update? - After every update of a third-party plugin you should add this code
Hello
Perhaps you inserted this code incorrectly or this code does not fit in the new version of a third-party plugin. We can add this plugin to the adaptation queue - https://currency-switcher.com/woocs-labs - and check it
what happen when plugin come with an update? - After every update of a third-party plugin you should add this code

skysolution(@skysolution)
47 PostsTopic Author
Customers
Quote from skysolution on May 24, 2024, 09:59
Hi Pablo
I think I placed it the wrong place , i couldn't find the line and code like your example in https://currency-switcher.com/woocs-labs for woocommerce product addon, my newest version dont look like your example. Please review your code and tell me where to place the changes, thanks
regards
Ole
Hi Pablo
I think I placed it the wrong place , i couldn't find the line and code like your example in https://currency-switcher.com/woocs-labs for woocommerce product addon, my newest version dont look like your example. Please review your code and tell me where to place the changes, thanks
regards
Ole

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on May 24, 2024, 11:26
as I wrote earlier in this case you need to create a new adaptation request - https://currency-switcher.com/woocs-labs
as I wrote earlier in this case you need to create a new adaptation request - https://currency-switcher.com/woocs-labs