WordPress.org

Support

Support » Plugins and Hacks » Existence of Product ID

Existence of Product ID

Viewing 1 replies (of 1 total)
  • I just had this problem and the following is my solution. Hope this might help someone in future 🙂

    $product = new WC_Product($product_id);
    
    if($product->product_type){
    	// as the product has a type that means the product exists !!!
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Existence of Product ID’ is closed to new replies.