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

Error when using the new woocs_init_compatibility_woo_subscriptions hook

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.
12

Hi,

I just tried using woocs_init_compatibility_woo_subscriptions on my site and I'm getting the following error:

Se ha producido un error del tipo E_ERROR en la línea 404 del archivo D:\laragon\www\lp\wp-content\plugins\woocommerce-currency-switcher\classes\compatibility\woocommerce_subscriptions.php. Mensaje de error: Uncaught Error: Class"WOOCS_Subscription_Fix" not found in D:\laragon\www\lp\wp-content\plugins\woocommerce-currency-switcher\classes\compatibility\woocommerce_subscriptions.php:404
Stack trace:
#0 D:\laragon\www\lp\wp-content\plugins\woocommerce-currency-switcher\classes\compatibility\compatibility.php(12): include_once()
#1 D:\laragon\www\lp\wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php(654): WOOCS_compatibility->__construct()
#2 D:\laragon\www\lp\wp-includes\class-wp-hook.php(324): WOOCS->init('')
#3 D:\laragon\www\lp\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 D:\laragon\www\lp\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
#5 D:\laragon\www\lp\wp-settings.php(727): do_action('init')
#6 D:\laragon\www\lp\wp-config.php(206): require_once('D:\\laragon\\www\\...')
#7 D:\laragon\www\lp\wp-load.php(50): require_once('D:\\laragon\\www\\...')
#8 D:\laragon\www\lp\wp-admin\admin.php(35): require_once('D:\\laragon\\www\\...')
#9 D:\laragon\www\lp\wp-admin\index.php(10): require_once('D:\\laragon\\www\\...')
#10 {main}
thrown

I used this snippet. I put the code in my theme's function.php file.

I fixed the issue by replacing all instances of"WOOCS_Subscription_Fix" to"WOOCS_Subscriptions_Compatibility" in the woocommerce_subscriptions.php file. I think this should be fixed in the next release.

Hello

Thank you for your cooperation

We will fix this in the next version.

I found new issues with the compatibility file when using products with variations:

Fatal error: Uncaught Error: Call to protected method WC_Product_Variable_Subscription::get_price_prefix() from scope WOOCS_Subscriptions_Compatibility in D:\laragon\www\lp\wp-content\plugins\woocommerce-currency-switcher\classes\compatibility\woocommerce_subscriptions.php:99 Stack trace: #0 D:\laragon\www\lp\wp-includes\class-wp-hook.php(324): WOOCS_Subscriptions_Compatibility->fix_variable_subscription_price_html(500.0, Object(WC_Product_Variable_Subscription)) #1 D:\laragon\www\lp\wp-includes\plugin.php(205): WP_Hook->apply_filters('<span class="wo...', Array) #2 D:\laragon\www\lp\wp-content\plugins\woocommerce-subscriptions\includes\core\class-wc-product-variable-subscription.php(109): apply_filters('woocommerce_var...', '<span class="wo...', Object(WC_Product_Variable_Subscription)) #3 D:\laragon\www\lp\wp-content\plugins\woocommerce\templates\loop\price.php(25): WC_Product_Variable_Subscription->get_price_html() #4 D:\laragon\www\lp\wp-content\plugins\woocommerce\includes\wc-core-functions.php(346): include('D:\\laragon\\www\\...') #5 D:\laragon\www\lp\wp-content\plugins\woocommerce\includes\wc-template-functions.php(1464): wc_get_template('loop/price.php') #6 D:\laragon\www\lp\wp-includes\class-wp-hook.php(324): woocommerce_template_loop_price('') #7 D:\laragon\www\lp\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #8 D:\laragon\www\lp\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #9 D:\laragon\www\lp\wp-content\plugins\woocommerce\templates\content-product.php(57): do_action('woocommerce_aft...') #10 D:\laragon\www\lp\wp-includes\template.php(812): require('D:\\laragon\\www\\...') #11 D:\laragon\www\lp\wp-content\plugins\woocommerce\includes\wc-core-functions.php(285): load_template('D:\\laragon\\www\\...', false) #12 D:\laragon\www\lp\wp-content\plugins\woocommerce\templates\archive-product.php(62): wc_get_template_part('content', 'product') #13 D:\laragon\www\lp\wp-content\plugins\woocommerce\includes\wc-core-functions.php(346): include('D:\\laragon\\www\\...') #14 D:\laragon\www\lp\wp-content\plugins\woocommerce\templates\taxonomy-product-cat.php(22): wc_get_template('archive-product...') #15 D:\laragon\www\lp\wp-includes\template-loader.php(106): include('D:\\laragon\\www\\...') #16 D:\laragon\www\lp\wp-blog-header.php(19): require_once('D:\\laragon\\www\\...') #17 D:\laragon\www\lp\index.php(17): require('D:\\laragon\\www\\...') #18 {main} thrown in D:\laragon\www\lp\wp-content\plugins\woocommerce-currency-switcher\classes\compatibility\woocommerce_subscriptions.php on line 99

Hello

Ok!  We were given this code.  If you want to fix the incompatibility with this third-party plugin - https://currency-switcher.com/woocs-labs

Hello

If you add access for [WOOCS LABS] please don't forget to leave a message on the forum after making changes to private data (adding access, links, etc.). For example: done. Because we do not have a notification of content changes in private data

Okay, thank you. I just posted the request here.

Hello

ok!  Can you  add  wp-admin+FTP access to your test  site - https://share.pluginus.net/image/i20230222134241.png ->https://share.pluginus.net/image/i20230222134615.png

I just added the login info.

Hello

Thank you! I will write to you as soon as I get the result

Hello

Please do a test

Thank you! It seems to be working fine.

I noticed that a product with variations is showing the price of the second variation instead of the first one:

This is what I see in the category page: https://i.ibb.co/Kp7w1hCJ/category-view.png - Price of ARS 1.000

The product page also shows ARS 1.000 by default: https://i.ibb.co/35W9f2xh/product-page-1.png

But it should be showing ARS 500 since that is the lowest price of the three variations available: https://i.ibb.co/sdn20h3n/product-page-2.png

 

 

Hello

Ok I will check it

Hello

Unfortunately your accesses do not work.

I'm sorry about this. I'll try to restore access tomorrow and I'll let you know.

I just restored access to the staging website.

Hello

Ok! thank you

I will check it

Hello

It looks like admin and FTP are accessing different sites. Because I can't see the changes I made to the file.

Try  in file - wp-content\plugins\woocommerce-currency-switcher\classes\compatibility\woocommerce_subscriptions.php  -  uncomment this code - https://c2n.me/4n9JxCD.png

and change this code - https://c2n.me/4n9Jzjg.png

$price = __('From', 'woocommerce') . wc_price( $price ) . $product->get_price_suffix();

and do a test

That's strange, it worked fine for me. I rechecked all the credentials and everything looks fine.

I just made the changes you suggested, but I keep seeing the same issue. Products in the category view aren't showing the lowest price of the variation.

Hello

Did you do it?

Try  in file - wp-content\plugins\woocommerce-currency-switcher\classes\compatibility\woocommerce_subscriptions.php  -  uncomment this code - https://c2n.me/4n9JxCD.png

I'm checking your file - https://share.pluginus.net/image/i20250922201900.png

12