Errors logged when adding items to Woocommerce cart
-
Firstly, thanks for a great plugin. ??
You might already be aware of this issue, but when I add items to my cart and view the cart afterwards, I noticed that error notices are being logged. Fortunately the cart process seems unaffected, and stats are still being gathered, but I thought you might like to know about the problem. Sample output is below –
[01-Aug-2017 12:30:06 UTC] id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_add_to_cart’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::add_to_cart, WC_AJAX::get_refreshed_fragments, woocommerce_mini_cart, wc_get_template, include(‘/plugins/woocommerce/templates/cart/mini-cart.php’), apply_filters(‘woocommerce_cart_item_product’), WP_Hook->apply_filters, gtm4wp_woocommerce_cart_item_product_filter, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.
[01-Aug-2017 12:30:06 UTC] post was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_add_to_cart’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::add_to_cart, WC_AJAX::get_refreshed_fragments, woocommerce_mini_cart, wc_get_template, include(‘/plugins/woocommerce/templates/cart/mini-cart.php’), apply_filters(‘woocommerce_cart_item_product’), WP_Hook->apply_filters, gtm4wp_woocommerce_cart_item_product_filter, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.
[01-Aug-2017 12:30:06 UTC] product_type was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_add_to_cart’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::add_to_cart, WC_AJAX::get_refreshed_fragments, woocommerce_mini_cart, wc_get_template, include(‘/plugins/woocommerce/templates/cart/mini-cart.php’), apply_filters(‘woocommerce_cart_item_product’), WP_Hook->apply_filters, gtm4wp_woocommerce_cart_item_product_filter, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.
- The topic ‘Errors logged when adding items to Woocommerce cart’ is closed to new replies.