Support » Plugin: Jetpack - WP Security, Backup, Speed, & Growth » Fatal Error in Jetpack Woocommerce Analytics

  • Resolved braetelliot

    (@braetelliot)


    Currently, my users are facing the following issue:

    When a user has logged in, and tries to view the product details page on my woocommerce enabled ecommerce site, they are faced with a fatal error, and are unable to view the product. However, when the user is not logged in, and is viewing the website as a guest, there is no issue, and they are able to view the product just fine. The error displayed is copied below

    Fatal error: Uncaught Error: Call to a member function get_id() on null in /home/customer/www/boundbywine.com/public_html/wp-content/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-universal.php:242 Stack trace: #0 /home/customer/www/boundbywine.com/public_html/wp-includes/class-wp-hook.php(287): Jetpack_WooCommerce_Analytics_Universal->capture_product_view(”) #1 /home/customer/www/boundbywine.com/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array) #2 /home/customer/www/boundbywine.com/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #3 /home/customer/www/boundbywine.com/public_html/wp-content/plugins/elementor-pro/modules/woocommerce/documents/product.php(105): do_action(‘woocommerce_aft…’) #4 /home/customer/www/boundbywine.com/public_html/wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php(72): ElementorPro\Modules\Woocommerce\Documents\Product->after_get_content() #5 /home/customer/www/boundbywin in /home/customer/www/boundbywine.com/public_html/wp-content/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-universal.php on line 242

    Please advise on solutions to overcome this. Thank you!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor csonnek

    (@csonnek)

    Happiness Rocketeer šŸš€

    Thanks for reaching out! While the file mentions Jetpack, the file itself is in the WooCommmerce plugin.

    I did a quick search of their support forum and it looks like it might be a conflict with your theme – or based on the error, a conflict with Elementor Pro? Link to forum post.

    If what they suggest in that thread doesn’t help, please open a new thread on their forum and they’ll be able to help you narrow down the issue.

    https://wordpress.org/support/plugin/woocommerce/#new-topic-0

    Since this is not a Jetpack issue, but a WooCommerce one, we’ll mark this resolved.

    Thread Starter braetelliot

    (@braetelliot)

    Hi @csonnek ,

    So I’ve tried to test out updating theme files, disabling plugins, etc. Only when I remove the Jetpack connection, the issue seems to disappear.

    As such, I believe it could be an issue with the Jetpack plugin. Please advise

    Plugin Contributor Dan

    (@drawmyface)

    Hi @braetelliot it sounds like a conflict between Jetpack and Elementor. Does the issue disappear if you keep Jetpack active and deactivate Elementor?

    Thread Starter braetelliot

    (@braetelliot)

    @csonnek yes it still exists unfortunately. I tried deactivating both elector pro and elementor, still exists after both

    Plugin Contributor Dan

    (@drawmyface)

    @braetelliot I haven’t been able to reproduce this issue on a test site running only Jetpack and WooCommerce, with the Twenty Twenty theme. In order to troubleshoot further, we’d need you to create a staging site with only those plugins/theme active.

    Could you contact us via this contact form and mention this thread so we can assist further?

    Thread Starter braetelliot

    (@braetelliot)

    @drawmyface I’ve found a way around this, by replacing line 242 of plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-universal.php from

    $product->get_id()

    to

    $product->ID

    ===

    Personally I don’t understand how this would fix it, but please do consider.

    Plugin Contributor Dan

    (@drawmyface)

    Hi @braetelliot – It seems there may be another plugin on your site modifying how product data is stored by WooCommerce, but Jetpack expects properly formatted data.

    We are tracking this issue here:
    https://github.com/Automattic/jetpack/issues/11301

    For now, you could deactivate Jetpack’s WooCommerce Analytics module if you don’t need it. You can do that as described here:

    https://jetpack.com/support/control-jetpack-features-on-one-page/

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