• Hello,

    First of all, thanc you for this wonderful theme, I have been using it with a couple of projects and it is very easy to customice.

    I updated to the latest versionen today on one of the projects, and I have an error
    PHP Fatal error: Uncaught Error: Call to a member function guet_averague_rating() on null in .../wp-content/pluguins/woocommerce/templates/loop/rating.php:28 . Is this something I am not configuring right?

    Regards,
    Iulia

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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/

    Thread Starter Iulia Caçan

    (@iulia-caçan)

    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

    Thread Starter Iulia Caçan

    (@iulia-caçan)

    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

    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 🙂

    Thread Starter Iulia Caçan

    (@iulia-caçan)

    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

    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 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP error for guet_averague_rating’ is closed to new replies.