Mini cart empty and get_image() error when adding item
-
On every attempt of adding an item to the cart, the following is recorded in the Woocommerce log. The item is technically added to the cart, but no details about the item can be seen, only an X to click to remove it from the cart. (seen here – https://imgur.com/a/2vdCAXe )
What does the error indicate to be the problem?
Using: WordPress 4.9.8 , Woocommerce 3.5.1
2018-11-18T21:34:32+00:00 CRITICAL Uncaught Error: Call to a member function get_image() on boolean in /home/XXXXX/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:1828
Stack trace:
#0 /home/XXXXX/public_html/wp-content/plugins/woocommerce/templates/cart/mini-cart.php(38): WC_Product->get_image()
#1 /home/XXXXX/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(208): include(‘/home/XXXXX/p…’)
#2 /home/XXXXX/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1999): wc_get_template(‘cart/mini-cart….’, Array)
#3 /home/XXXXX/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(171): woocommerce_mini_cart()
#4 /home/XXXXX/public_html/wp-includes/class-wp-hook.php(286): WC_AJAX::get_refreshed_fragments(”)
#5 /home/XXXXX/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
#6 /home/XXXXX/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#7 /home/XXXXX/public_html/wp-content/plug in /home/XXXXX/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php on line 1828
- The topic ‘Mini cart empty and get_image() error when adding item’ is closed to new replies.