The woocommerce product_type notification was not called correctly. Product properties should not be directly accessible
I have this notification with all products on the store page after updating my WooCommerce version to 3.0.
Note: product_type was called incorrectly, Product properties should not be directly accessible. See Debugging in WordPress for more information. (This post was added in version 3.0.) In C: \ xampp \ htdocs \ oye \ wp-includes \ functions.php on line 4137
any idea how to fix it?
+3
source to share
2 answers
The product_type property has been deprecated. Use get_type () to get the internal type.
So, you need to change this:
$product->product_type;
:
$product->get_type();
+8
source to share