Error log for woocommerce product
-
I am getting an error log on one of my products on my site https://stoughtonwrestling.com/product/golf-outing
It is is related to the?/product/golf-outing/
I am able to reproduce the error when visiting this page but my client isFrom the error log I can see the following:
2024/08/01 15:10:51 [error] 85822#85822: *15481 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function is_purchasable() on string in /www/stoughtonwrestling_139/public/wp-content/themes/flatsome/inc/woocommerce/structure-wc-product-page.php:255Stack trace:#0 /www/stoughtonwrestling_139/public/wp-includes/class-wp-hook.php(324): flatsome_sticky_add_to_cart_template('')#1 /www/stoughtonwrestling_139/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)#2 /www/stoughtonwrestling_139/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#3 /www/stoughtonwrestling_139/public/wp-includes/general-template.php(3081): do_action('wp_footer')#4 /www/stoughtonwrestling_139/public/wp-includes/template-canvas.php(25): wp_footer()#5 /www/stoughtonwrestling_139/public/wp-content/plugins/woocommerce/src/Internal/ComingSoon/ComingSoonRequestHandler.php(69): include('/www/stoughtonw...')#6 /www/stoughtonwrestling_139/public/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Internal\ComingSoon\Comi" while reading response header from upstream, client: 216.56.92.44, server: stoughtonwrestling[.]com, request: "GET /product/golf-outing/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php8.1-fpm-stoughtonwrestling.sock:", host: "stoughtonwrestling[.]com:53034", referrer: "https[:]//stoughtonwrestling[.]com/golf-registration/"
This error indicates that there is an attempt to call the
is_purchasable()
method on a string, which is not a valid operation. This suggests that the variable being used is expected to be a product object but is instead a string.The error occurs in the
flatsome_sticky_add_to_cart_template()
function within the filestructure-wc-product-page.php
at line 255.They recommend to check the details with the plugin author in the file?
structure-wc-product-page.php
?and confirm is properly configuredThis is what I am getting from our hosting tech.
Can you please tell me how to fix this?Thank you!
Carla Scholz
- You must be logged in to reply to this topic.