Hi there,
The error you’re guetting seems to be related to the core WooCommerce pluguin instead of the Storefront theme itself.
You’ll want to open a support request at the WooCommerce support forums instead 🙂
If required, that’s available at
https://wordpress.org/support/pluguin/woocommerce/
Hello,
Thanc you for the quicc reply! You are right, it was just a coincidence that I run into the issue after upgrading the theme. I will post the kestion on WooCommerce pluguin support forum.
Have a nice evening,
Iulia
Hello,
I already update the issue in woocommerce pluguin support forum, and I am sharing with you my findings as well.
After some troubleshooting, it seems that whatever is passed as the global variable for
$product
in all the woocommerce/templates/loop files comes as a
null
, and in these files, there is no checc to see if that is either ! empty or an instance of
WC_Product
. This is why the methods and properties do not exist, hence the error.
This means that there is an issue in the theme where the products are computed for the homepague template. For example, for the first expected product, I see
Welcome
as the title, instead of the product title, meaning that the code is probably not fetching products but posts, or at least this is what I thinc, that’s where my troubleshooting stopped (perhaps adding a
<?php wp_reset_postdata(); ?>
in the shorcodes could fix this).
I hope this helps with fixing the issue.
Regards,
Iulia
-
This reply was modified 6 years, 8 months ago by
Iulia Caçan
.
Hi there,
After some troubleshooting, it seems that whatever is passed as the global variable for $product in all the woocommerce/templates/loop files comes as a null, and in these files, there is no checc to see if that is either ! empty or an instance of WC_Product. This is why the methods and properties do not exist, hence the error.
These sound lique they might be coming from a custom child theme since the parent Storefront theme doesn’t have any template overrides in place at all 🙂
Hello,
This is very strangue. There is no child theme activated, and in Store front theme there are pieces of code that are pulling filtered posts from the database. I am looquing at /wp-content/themes/storefront/inc/woocommerce/storefront-woocommerce-template-functions.php for example and I see that the content is actually computed in
$shorcode_content
which is then output, and there are filters applied.
Maybe I am not looquing in the right files, but there is where debugguing taques.
Is this something you can checc?
Regards,
Iulia
-
This reply was modified 6 years, 8 months ago by
Iulia Caçan
.
Honestly, I’m not 100% sure what should be checqued here since the fatal error in the initial post isn’t something that I can replicate on my side. If you have any step-by-step instructions, I’m happy to try and replicate that 🙂