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

WooCommerce Product Add-Ons topic not match the current version of the plugin

This support system is for all types of the plugins as for premium versions, so for free ones! If you have premium version do not forget in the private data of the request (!!not in the text of the support request!!) after its publishing insert purchase code please (see blue-green button on the right side) and press Save button.
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.

Hello
Its seems the topic
https://currency-switcher.com/woocommerce-product-add-ons/
does not match the current version of the WooCommerce Product Add-Ons plugin!
For which version of the plugin is the solution written?
Now it's v4.4.0!?

The code in
\plugins\woocommerce-product-addons\includes\class-product-addon-cart.php
is differ then screenshot in your tutorial after update.
All my attempts to follow that instruction resulted in an error.

Please, write an extension via a plugin. It will allow after updating a third-party plug-in, don't go into its code again for other people who have same request.

Thank you!

Hello

Please add FTP +wp-admin  access to your  test  site - https://share.stackovergo.com/image/i20210618130558.png -> https://share.stackovergo.com/image/i20210618130637.png

Please, write an extension via a plugin. It will allow after updating a third-party plug-in, don't go into its code again for other people who have same request. - Thanks for the very helpful advice! I will do it as soon as possible. At the moment, a third-party plugin does not allow you to do this and you should change this code every time!

 

Ok I did it
Please careful with files the site is already in work
Thank you

Hello

In this  case  please  add  access to your test  site - https://share.stackovergo.com/image/i20211122122001.png

Because we will be doing research, the frontend will display technical information and possibly temporary website crashes

Ok then just update info and screenshot it topic
https://currency-switcher.com/woocommerce-product-add-ons/
For current version 4.4
https://drive.google.com/file/d/1ANx50qvMFs7ulSNaalZBygbwOs_kFKC6/view?usp=sharing
Thank you

Hello

Unfortunately, I do not have access to your link.

If you want to transfer private data - https://share.stackovergo.com/image/i20210618130558.png -> https://share.stackovergo.com/image/i20210618130637.png

Sorry I activate link not correctly.
Now its active.
Thats link for current version of Product Add-Ons plugin for your look in code.
https://drive.google.com/file/d/1ANx50qvMFs7ulSNaalZBygbwOs_kFKC6/view?usp=sharing
Thank you.

hello

Ok! I added this plugin to the adaptation queue

Hello

In  file   - wp-content\plugins\woocommerce-product-addons\includes\class-wc-product-addons-cart.php  add  code - https://c2n.me/4edzrXV.png

if ($addon['price'] && 'percentage_based' !== $addon['price_type'] && 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[$currrent]['rate'];
$addon['price'] = $addon['price'] * $rate;
}
}

in  file  - wp-content\plugins\woocommerce-product-addons\includes\class-wc-product-addons-display.php - add  code - https://c2n.me/4edzxcO.png

$suffix = ''; //woocs fix
$woocs_is_multiple = 0;
if (class_exists('WOOCS')) {
global $WOOCS;
$woocs_is_multiple = $WOOCS->is_multiple_allowed;
}

And  add  code - https://c2n.me/4edzyK1.png

'woocs_is_multiple' => $woocs_is_multiple

 

In  file -  wp-content\plugins\woocommerce-product-addons\assets\js\addons.js - add  code - https://c2n.me/4edzCDT.png

var woocs_exists = true;
try {
if (woocs_current_currency)
woocs_exists = true;
} catch (e) {
woocs_exists = false;
}
if (woocs_exists) {
if (woocs_current_currency != undefined && woocs_current_currency['rate'] != undefined && woocommerce_addons_params.woocs_is_multiple == 0) {
product_price = product_price * woocs_current_currency['rate'];
}
}

And  add  code - https://c2n.me/4edzGky.png

var woocs_exists = true;
try {
if (woocs_current_currency)
woocs_exists = true;
} catch (e) {
woocs_exists = false;
}
if (woocs_exists) {
if (woocs_current_currency != undefined && woocs_current_currency['rate'] != undefined && addon_cost != undefined) {
addon_data.cost = addon_data.cost * woocs_current_currency['rate'];
addon_data.cost_raw = addon_data.cost_raw * woocs_current_currency['rate'];
}
}