Read a wishlist

To get the details of a wishlist, use the wrapper function nmgr_get_wishlist.

This function would return false if the wishlist doesn’t exist so except if you are sure the wishlist exists, it is always good to check if the wishlist exists after calling the function in order to prevent errors from occuring when the wishlist’s methods are called on a non-existent object.


To get the details of a wishlist with id 7:

$wishlist = nmgr_get_wishlist(7);

if($wishlist) {
  $title = $wishlist->get_title();
  $first_name = $wishlist->get_first_name();
  $items_in_wishlist = $wishlist->get_items();
  $shipping_address = $wishlist->get_shipping_address();
  // and much more