• 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, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_add_to_cart’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::add_to_cart, apply_filters(‘woocommerce_add_to_cart_validation’), WP_Hook->apply_filters, call_user_func_array, WC_Quantities_and_Units_Quantity_Validations->add_to_cart_validation, WC_Quantities_and_Units_Quantity_Validations->validate_single_product, wcqu_get_applied_rule, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.

Viewing 1 replies (of 1 total)
  • I am seeing this too. It needs to be updated for WooCommerce 3.0. You can switch each $product->id to $product->get_id() but if the plugin itself wants to maintain back-compatibility it will probably need a “helper” function to return the appropriate product ID for <3.0 and >3.0. Though 3.2 is coming soon and personally I’ll be dropping support for <3.0 from my own WC-related plugins.

Viewing 1 replies (of 1 total)
  • The topic ‘id was called incorrectly’ is closed to new replies.