Received the below email after website when down the moment i activated WC Tab Manager.
Howdy!
Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, Price Comparison Pro.
Error Details
=============
An error of type E_ERROR was caused in line 413 of the file /home/website/public_html/wp-content/plugins/price-comparison-pro/wordpress-price-comparison.php. Error message: Uncaught Error: Call to a member function get_id() on null in /home/website/public_html/wp-content/plugins/price-comparison-pro/wordpress-price-comparison.php:413
Stack trace:
#0 /home/website/public_html/wp-includes/shortcodes.php(325): pricecomparison_wooproductsummary(”, ”, ‘pricecomparison…’)
#1 [internal function]: do_shortcode_tag(Array)
#2 /home/website/public_html/wp-includes/shortcodes.php(199): preg_replace_callback(‘/\\[(\\[?)(pricec…’, ‘do_shortcode_ta…’, ‘[pricecompariso…’)
#3 /home/website/public_html/wp-includes/class-wp-hook.php(286): do_shortcode(‘[pricecompariso…’)
#4 /home/website/public_html/wp-includes/plugin.php(208): WP_Hook->apply_filters(‘[pricecomparis
August 25, 2019 @ 9:30 am
This is an odd one. In order for this error to happen, it means the shortcode is running outside of the WooCommerce product loop.
It relies on there being a global $product variable, which *should* exist.
Maybe in the WC_Tab plugin you added the pcpro shortcode inside the tab? And maybe inside there it’s outside of the product loop somehow?
I’ll investigate, but if you have any further info to shed on this it would be helpful.
October 16, 2020 @ 2:44 pm
Note – the shortcode I was referring to is the one specific to WooCommerce products for Price Comparison Pro.
There IS another shortcode which can be used to display the pricing table on ANY page – the shortcodes and their parameters are listed in the settings page of Price Comparison Pro.