woocommerce – product_type null
-
Hi every One,
I have a bug to retrieve the product_type when I use:
$product = new WC_Product("619"); // ID EXISTS echo $product->product_type; // return: NULL //I try to var_dump $product var_dump($product); // return array with post_title, exerpt, id with good information in woocommerce and the product_type NULL
I see in the WC_Product class that no function fill the $product_type
(ref: https://docs.woothemes.com/wc-apidocs/class-WC_Product.html)Also,
I have already try:var_dump($product->is_type('simple')); // return: bool(false); this is the good type
Anyone can be help me ?
Thank you
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘woocommerce – product_type null’ is closed to new replies.