How to get products ids
-
Hello!
I try to get products швы like this:
foreach ($receivers_ids as $receivers_id) { $user_id = $receivers_id; print($user_id . ','); $wishlist_ids = YITH_WCWL()->get_wishlists( array( 'user_id' => $user_id ) ); foreach ($wishlist_ids as $wishlist_id) { $wish_id = $wishlist_id['id']; print($wish_id . ','); $wish_products = YITH_WCWL()->get_products( [ 'wishlist_id' => 'all' ] ); //var_dump($wish_products); foreach ($wish_products as $wish_product) { $product_id = $wish_product['prod_id']; print($product_id . ','); } } }
And get only product from last wishlist. Could you tell why?
I also try to use $wish_id instead ‘all’ but get the same.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to get products ids’ is closed to new replies.