Fatal error on Product page when using Variations
-
After upgrading to latest version we are getting the following on product pages that have variations.
“There has been a critical error on your website.”
It breaks the layout of the page.
Simple products are ok.
Error log shows….
[06-Dec-2022 09:35:08 UTC] PHP Fatal error: Uncaught Error: Call to a member function is_in_stock() on array in /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:1375 Stack trace: #0 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(1321): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->has_in_stock_variation(Array) #1 /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(592): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->product_supports_payment(Object(WC_Product_Variable)) #2 /wp-includes/class-wp-hook.php(287): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->message_renderer('') #3 /wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #4 /wp-includes/plugin.php(478): WP_Hook->do_action(Array) #5 /home/ira in /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php on line 1375
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Fatal error on Product page when using Variations’ is closed to new replies.