Hello,
Thank you for reaching out to us.
Could you please confirm which version of the Flexible Subscriptions plugin you’re currently using? We’ve added official support for WooCommerce’s High-Performance Order Storage (HPOS) several versions ago – specifically in version 1.3.0, as you can see in our changelog here:
https://ww.wp.xz.cn/plugins/flexible-subscriptions/#developers
Regarding the error you’re encountering:
Uncaught LogicException: Cheapest variation must be a subscription product variation.
This message indicates that one of your variable subscription products likely includes a variation that is not set as a subscription product, which causes the plugin to fail when trying to calculate the price.
I’ve tried to reproduce this issue in my test environment using the latest version of the plugin with HPOS enabled, but unfortunately, I wasn’t able to trigger the same error.
To help us investigate further, could you please let us know, exactly when the error appears – for example, does it happen when viewing the Products list in the admin panel, editing a product, or elsewhere?
Once we have that information, we’ll be better equipped to pinpoint the issue and assist you.
Thanks for your cooperation.
Kind regards,
Hi
I am using Version 1.5.3.
The error has happened a couple of times. The latest time was after creating a new product with variables and setting it to ‘publish’. It didn’t crash when in ‘draft’, only after publishing it.
It happened a few times previously when there was a clash with this plugin and the Payments for PayPal plugin. Something to do with SubscriptionController. I removed the PayPal plugin and everything seemed okay after that until now.
Thanks
In follow up to my last message, here are some of the errors I have received:
Error Details ============= An error of type E_ERROR was caused in line 47 of the file xxxxxx.com/wp-content/plugins/flexible-subscriptions/src/Product/VariableSubscriptionProduct.php. Error message: Uncaught LogicException: Cheapest variation must be a subscription product variation. in xxxxxx.com/wp-content/plugins/flexible-subscriptions/src/Product/VariableSubscriptionProduct.php:47 Stack trace: #0 xxxxxx.com/wp-content/plugins/flexible-subscriptions/src/Product/VariableSubscriptionProduct.php(31): WPDesk\FlexibleSubscriptions\Product\VariableSubscriptionProduct->get_cheapest_variation() #1 xxxxxx.com/wp-content/plugins/woocommerce/includes/admin/list-tables/class-wc-admin-list-table-products.php(252): WPDesk\FlexibleSubscriptions\Product\VariableSubscriptionProduct->get_price_html() #2 xxxxxx.com/wp-content/plugins/woocommerce/includes/admin/list-tables/abstract-class-wc-admin-list-table.php(261): WC_Admin_List_Table_Products->render_price_column() #3 xxxxxx.com/wp-includes/class-wp-hook.php(324): WC_Admin_List_Table->render_columns(‘price’, 4720) #4 xxxxxx.co
and
Error Details ============= An error of type E_ERROR was caused in line 22 of the file xxxxx.com/wp-content/plugins/pymntpl-paypal-woocommerce/src/Container/Container.php. Error message: Uncaught Exception: There is no callback registered for id PaymentPlugins\PPCP\WooCommerceSubscriptions\SubscriptionController in xxxxxx.com/wp-content/plugins/pymntpl-paypal-woocommerce/src/Container/Container.php:22 Stack trace: #0 xxxxxxx.com/wp-content/plugins/pymntpl-paypal-woocommerce/packages/woocommerce-subscriptions/src/Package.php(20): PaymentPlugins\WooCommerce\PPCP\Container\Container->get(‘PaymentPlugins\\…’) #1 xxxxxxxx.com/wp-content/plugins/pymntpl-paypal-woocommerce/src/Package/PackageController.php(50): PaymentPlugins\PPCP\WooCommerceSubscriptions\Package->initialize() #2 xxxxxxx.com/wp-includes/class-wp-hook.php(324): PaymentPlugins\WooCommerce\PPCP\Package\PackageController->initialize_packages(”) #3 xxxxxx.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 xxxxxxx.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
and
Error Details ============= An error of type E_ERROR was caused in line 47 of the file xxxxxxx.com/wp-content/plugins/flexible-subscriptions/src/Product/VariableSubscriptionProduct.php. Error message: Uncaught LogicException: Cheapest variation must be a subscription product variation. in xxxxxxx.com/wp-content/plugins/flexible-subscriptions/src/Product/VariableSubscriptionProduct.php:47 Stack trace: #0 xxxxxxx.com/wp-content/plugins/flexible-subscriptions/src/Product/VariableSubscriptionProduct.php(31): WPDesk\FlexibleSubscriptions\Product\VariableSubscriptionProduct->get_cheapest_variation() #1 xxxxxxxx.com/wp-content/plugins/woocommerce/includes/admin/list-tables/class-wc-admin-list-table-products.php(252): WPDesk\FlexibleSubscriptions\Product\VariableSubscriptionProduct->get_price_html() #2 xxxxxxxx.com/wp-content/plugins/woocommerce/includes/admin/list-tables/abstract-class-wc-admin-list-table.php(261): WC_Admin_List_Table_Products->render_price_column() #3 xxxxxxxxx.com/wp-includes/class-wp-hook.php(324): WC_Admin_List_Table->render_columns(‘price’, 3816) #4 xxxxxxxx.co
They may not all be related but all of them reference ‘subscription’
Thanks
Also, I forgot to mention, the latest error happened after creating a new flexible subscription product and auto generating the variables. All the variable generated but no pricing had been added to the different variables yet at the point the website crashed.
Hello,
Thank you for the additional information.
I was able to reproduce the error you described. However, I want to confirm that this issue is not related to WooCommerce’s High-Performance Order Storage (HPOS). The error occurs specifically during the automatic generation of subscription product variations.
As a temporary workaround, please avoid using the automatic variation generation. If you do need to use it, after the variations are generated but before publishing the product, manually enter prices for each variation and set the payment frequency accordingly. By default, when variations are autogenerated, the payment frequency is set to “every 0 months,” which causes the issue. Once these fields are set correctly, you can safely publish the product.
I have forwarded this matter to our developers responsible for the Flexible Subscriptions plugin to analyze and fix. I will notify you as soon as the update with the fix is available.
Thank you for your understanding and cooperation.
Kind regards,
Hi
Thank you for the reply.
I have since managed to get some subscription products added to the site and they have been functioning well so far.
One other thing I noticed, that may be related to this issue, was when adding new values of new attributes directly into a new product page. For example, if I added small | medium | large and clicked to save the product, those values stayed as editable text, i.e. they stayed in small | medium | large text form instead of crystallising into non-editable values that appear as grey boxes with those words in that can only be deleted by pressing the cross and shouldn’t still be editable after saving.
It seems I couldn’t add and save values of attributes directly in the new product page. I had to go to the attributes page and create a new attribute and add values there first, then go back to the new product and pull them in to add to the product. After that the products seemed to work well.
Thanks
Hi,
Thank you very much for the additional details – this is very helpful.
I’ve passed everything you shared to our development team responsible for the Flexible Subscriptions plugin. They’re currently analyzing the issue, including the behavior you described when adding new attribute values directly within the product edit screen.
We really appreciate your patience, and I’ll make sure to update you in this thread as soon as a fix is ready.
Kind regards,
Hello,
Thank you for your patience.
I just wanted to let you know that we’ve released a new update to the Flexible Subscriptions plugin — version 1.6.0 — which includes a fix for the issue you reported. Specifically, we’ve resolved a critical error that could occur when product variations did not have a price set.
I encourage you to update the plugin to the latest version and verify if the issue has been fully resolved on your end.
Thank you again for your detailed reports and cooperation — it was very helpful in identifying and fixing the problem.
Kind regards,
Thanks for the update. I will try it out and feedback
Thanks
Hi, I’ve had a chance to test the update and it does seem to have fixed the issue. The website isn’t crashing during creation of variables anymore.
Thanks
Hi,
That’s great to hear — thank you so much for confirming!
I’m really glad the update resolved the issue. If you run into anything else or have any questions down the line, feel free to reach out.
Best regards,