Woocommerce inventory related errors
-
With the wp_config.php file defined like this:
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, true);And plugin: “Quantity Field on Shop Page for WooCommerce” Active!
If I go to a “Woocommerce” product and activate the [Inventory] > [Inventory Status] option for “In Stock“.
Or if you check the option: “Enable product-level inventory management“.
I get a very big error just below each product. Look:
Notice: stock_quantity was called incorrectly. Product properties must not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/generatepress/page.php'), generate_do_template_part, get_template_part, locate_template, load_template, require('/themes/generatepress/content-page.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, PT_CV_Functions::view_output, PT_CV_Functions::view_process_settings, PT_CV_Functions::get_posts_list, PT_CV_Html::view_type_output, PT_CV_Html::field_item_html, apply_filters('pt_cv_field_item_html'), WP_Hook->apply_filters, PT_CV_Hooks_Pro::filter_field_item_html, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::product_add_to_cart, woocommerce_template_loop_add_to_cart, wc_get_template, include('/plugins/woocommerce/templates/loop/add-to-cart.php'), apply_filters('woocommerce_loop_add_ in /home1/user/public_html/mydomain.com/site/wp-includes/functions.php on line 5768
If I disable your plugin, the error goes away.
Can anyone help me to resolve this?
- The topic ‘Woocommerce inventory related errors’ is closed to new replies.