Support » Plugin: YITH WooCommerce Wishlist » Get the contents of the wishlist

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi talooz,

    You can get all items stored in default wishlist for current user with this simple snippet of code

    $items = YITH_WCWL()->get_products();

    Please, let me know if everything works as expected
    Have a nice day 🙂

    Hi,
    I try this code but it return empty array while the whishlist page has products
    Thanks

    At the moment I managed to find temporary solution.
    It’s only retrieve products if I give a parameter wishlist_id, its not work if replace 1 with ‘all’
    $items = YITH_WCWL()->get_products(array( ‘wishlist_id’ => 1));

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get the contents of the wishlist’ is closed to new replies.