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

[WOOCS LABS] WooCommerce Subscriptions by WooCommerce (Needs Update v4.4.0)

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.

Hi there, please update your custom code for compatibility with WooCommerce Subscriptions by WooCommerce 4.4.0.

Hello

Are there new incompatibilities? Or just the files don't match?

Please  try:

In file functions.php of your current wp theme add next code:

add_filter('woocommerce_subscription_price_string_details', 'woocs_woocommerce_subscription_price_string_details', 100, 2);

function woocs_woocommerce_subscription_price_string_details($arg, $_this) {

if (class_exists('WOOCS')) {

global $WOOCS;

$order_currency = get_post_meta($_this->get_id(), '_order_currency', true);

if ($order_currency AND $WOOCS->current_currency != $order_currency) {

$WOOCS->set_currency($order_currency);

}

}

return $arg; }

In file - \wp-content\plugins\woocommerce-subscriptions\vendor\woocommerce\subscriptions-core\includes\wcs-order-functions.php add code - https://share.pluginus.net/image/i20220415153207.png

if(class_exists('WOOCS') AND 'renewal_order' == $type ){
global $WOOCS;
$_order_currency = get_post_meta($subscription->get_id(), '_order_currency', true);
if($_order_currency){
$WOOCS->set_currency($_order_currency);
}
}

and  - https://c2n.me/4frn1ZN.png

if (class_exists('WOOCS')) {
global $WOOCS;
$order_currency = get_post_meta($order_id, '_order_currency', true);
if ($order_currency AND $WOOCS->current_currency != $order_currency) {
$WOOCS->set_currency($order_currency);
}
}

in  file - \wp-content\plugins\woocommerce-subscriptions\vendor\woocommerce\subscriptions-core\includes\class-wcs-cart-renewal.php - add  code - https://share.pluginus.net/image/i20220415153708.png

if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$curr = get_post_meta($subscription->get_id(), '_order_currency', true);
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$curr]['rate'];
$price = $price / ($rate);
}
}

in  file  - \wp-content\plugins\woocommerce-subscriptions\vendor\woocommerce\subscriptions-core\includes\class-wc-subscriptions-product.php - add code - https://share.pluginus.net/image/i20220415153843.png

if (class_exists('WOOCS') AND $subscription_price) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$subscription_price = $WOOCS->woocs_exchange_value(floatval($subscription_price));
}
}

In  file -  wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wc-product-variable-subscription.php - add  code - https://share.pluginus.net/image/i20220422153504.png

if (isset($prices['price'][$min_price_variation_id])){
$price = $prices['price'][$min_price_variation_id];
}

Hi Pablo,

I was able to integrate all the changes you gave, my site still loads, so I think I did it correctly. Not sure if it works as it should with the new update, as I am not a programmer lol

Hello

let me know if you notice any incompatibilities