Add a non woocommerce product to wishlist?
-
Hey there,
I am pretty sure you can add non-products to wishlists, however I am unable to find the right function call.
I tried:
$yith = new YITH_WCWL_Wishlist(); $x = $yith->add_product(3052);
where 3052 is a post type page however it fails because the add_product method checks
$product = wc_get_product( $product_id ); if( ! $product || $this->has_product( $product_id ) ){ return false; }
which fails, what is the right way to add a non-product to the wishlist
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Add a non woocommerce product to wishlist?’ is closed to new replies.