• Resolved gocomunicazione

    (@gocomunicazione)


    Hello,
    we get an error on the checkout thank you page.

    The error is the following:

    Fatal error: Uncaught Error: Call to a member function get_product() on array in /home/laluce/webapps/laluce/wp-content/plugins/enhanced-e-commerce-for-woocommerce-store/public/class-enhanced-ecommerce-google-analytics-public.php:279 Stack trace: #0 /home/laluce/webapps/laluce/wp-includes/plugin.php(524): Enhanced_Ecommerce_Google_Analytics_Public->ecommerce_tracking_code(78547) #1 /home/laluce/webapps/laluce/wp-content/themes/bodega/woocommerce/checkout/thankyou.php(64): do_action(‘woocommerce_tha…’, 78547) #2 /home/laluce/webapps/laluce/wp-content/plugins/woocommerce/includes/wc-core-functions.php(203): include(‘/home/laluce/we…’) #3 /home/laluce/webapps/laluce/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php(212): wc_get_template(‘checkout/thanky…’, Array) #4 /home/laluce/webapps/laluce/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php(59): WC_Shortcode_Checkout::order_received(78547) #5 /home/laluce/webapps/laluce/wp-content/plugins/woocommerce/i in /home/laluce/webapps/laluce/wp-content/plugins/enhanced-e-commerce-for-woocommerce-store/public/class-enhanced-ecommerce-google-analytics-public.php on line 279

    We run:
    – WordPress 4.6.17
    – Woocommerce 2.6.14
    – PHP 7.2.28

    Any idea on how to solve?
    Thank you

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Conversios

    (@tatvic)

    Hey @gocomunicazione,

    We are looking into the issue and will update you as soon as possible.

    Regards,
    Tatvic.

    Plugin Author Conversios

    (@tatvic)

    Hi @gocomunicazione,

    We had thoroughly checked this issue and it seemed to be a compatibility issue with the mentioned WooCommerce version.

    You could follow the below workaround to resolve the issue:

    1) Navigate to the below-mentioned file path and line number :

    wp-content/plugins/enhanced-e-commerce-for-woocommerce-store/public/class-enhanced-ecommerce-google-analytics-public.php:279

    2) Locate the older code:

    $_product = $item->get_product();

    3) Replace the older code with the below code:

    if (version_compare($woocommerce->version, “2.7”, “<“)) {
    $_product = $item->get_product();
    }else{
    $_product = $item->wc_get_product();
    }

    We have marked this issue and will fix it in the upcoming release.

    Hope this resolves your issue.

    Regards,
    Tatvic Analytics.

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

The topic ‘Uncaught Error: Call to a member function get_product()’ is closed to new replies.