PHP Notice: Function id was called incorrectly
-
Hi,
I constantly receive PHP notices in my debug.log file:
PHP Notice: Function id was called <strong>incorrectly</strong>. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/single-product.php'), wc_get_template_part, load_template, require('/plugins/woocommerce/templates/content-single-product.php'), do_action('woocommerce_single_product_summary'), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_template_single_add_to_cart, do_action('woocommerce_simple_add_to_cart'), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_simple_add_to_cart, wc_get_template, include('/plugins/woocommerce/templates/single-product/add-to-cart/simple.php'), woocommerce_quantity_input, apply_filters('woocommerce_quantity_input_max'), WP_Hook->apply_filters, IPQ_Filters->input_max_value, wpbo_get_applied_rule, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see <a href="https://ww.wp.xz.cn/support/article/debugging-in-wordpress/">Debugging in Wor in /home/public_html/shop/wp-includes/functions.php on line 5833and
PHP Notice: Function product_type was called <strong>incorrectly</strong>. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/single-product.php'), wc_get_template_part, load_template, require('/plugins/woocommerce/templates/content-single-product.php'), do_action('woocommerce_single_product_summary'), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_template_single_add_to_cart, do_action('woocommerce_simple_add_to_cart'), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_simple_add_to_cart, wc_get_template, include('/plugins/woocommerce/templates/single-product/add-to-cart/simple.php'), woocommerce_quantity_input, apply_filters('woocommerce_quantity_input_max'), WP_Hook->apply_filters, IPQ_Filters->input_max_value, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see <a href="https://ww.wp.xz.cn/support/article/debugging-in-wordpress/">Debugging in WordPress</a> fo in /home/public_html/shop/wp-includes/functions.php on line 5833I am using a child theme although I am not sure what customisations have been made to the core theme files as others who were employed before me have not documented changes – the plugin has not been updated for over a year to preserve these changes. How can I fix these PHP notices without updating the core theme and losing customisations and functions unknown to me?
These notices are generated so often that they make the debug.log file take up 100’s of MBs in less than a month which is a lot for just plain text. It generates about 200 lines per hour repeating just the above notices.
Thanks.
The topic ‘PHP Notice: Function id was called incorrectly’ is closed to new replies.
