get_id was called incorrectly.Product properties should not be accessed directly. Backtrace: require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘wp_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Cart->init, WC_Cart->get_cart_from_session, WC_Product->is_purchasable, apply_filters(‘woocommerce_is_purchasable’), WP_Hook->apply_filters, call_user_func_array, som_disable_repeat_purchase, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.
i found https://github.com/woocommerce/woocommerce/issues/14369
Accessing directly product data is not allowed, e.g. $product->id. Correct method going forward is $product->get_id().
- The topic ‘id was called incorrectly. Product properties should not be accessed directly’ is closed to new replies.