[Resolved] Fatal error on woocommerce logs

Home Forums Support Fatal error on woocommerce logs

  • This topic has 3 replies, 2 voices, and was last updated 4 months ago by Tom.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1291602
    Deniz Akay

    Hi,

    I’m getting the following error message on woocommerce error logs:

    CRITICAL ../wp-content/plugins/gp-premium/woocommerce/functions/functions.php dosyasında 582 numaralı satırda Uncaught Error: Call to a member function is_empty() on null in ../wp-content/plugins/gp-premium/woocommerce/functions/functions.php:582
    Stack trace:
    #0 ../wp-includes/class-wp-hook.php(287): generatepress_wc_mobile_cart_link('')
    #1 ../wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #2 ../wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 ../wp-content/themes/generatepress/inc/structure/navigation.php(31): do_action('generate_inside...')
    #4 ../wp-content/themes/generatepress/inc/structure/navigation.php(139): generate_navigation_position()
    #5 ../wp-includes/class-wp-hook.php(287): generate_add_navigation_after_header('')

    I’ve got latest versions of Wp, Woo, GP and GP Premium installed.

    Thanks!

    #1292344
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Are you seeing any errors on the front-end, or is this just in the logs?

    That line contains this code:

    if ( ! WC()->cart->is_empty() ) {
        $has_items = ' has-items';
    }

    That’s the current best way to check if the cart is empty – your error looks like it’s saying the WooCommerce WC() class doesn’t exist.

    Are you using any caching plugins/server caching?

    #1295079
    Deniz Akay

    It is just in the woo logs, I don’t see any errors on front end.

    And yes I’m using fastest cache plugin.

    #1295685
    Tom
    Lead Developer
    Lead Developer

    I’m assuming that the cache is preventing WooCommerce from fully initiating, so that class ends up not having any value.

    We’ll add some safeguards into GPP to prevent the errors in the logs.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.