woocommerce notice product_type was called incorrectly . Product properties should not be accessed directly

后端 未结 2 1814
清酒与你
清酒与你 2021-01-05 04:41

I\'m having this notice with all products on shop page after updating WooCommerce version to 3.0.

Notice: product_type was called incorrectly . Product properties sh

2条回答
  •  离开以前
    2021-01-05 05:30

    (in functions.php) tried editing the "Select Options" text in WooCommerce and it gave that error.

    Rafawhs answer worked for me too. This: $product->get_type();

提交回复
热议问题