Support » Plugin: TI WooCommerce Wishlist » Get all product data from wishlist products

Viewing 1 replies (of 1 total)
  • Plugin Author templateinvaders

    (@templateinvaders)

    Hi @vicky0007

    You can get wishlist products data in a similar way:

           // Get wishlist data array by ID or SHAREKEY
    	$wishlist = tinv_wishlist_get();
    
    	// Init Wishlist products object
    	$wishlist_products = new TInvWL_Product( $wishlist );
    
    	/* Get an array of products data in the structure
    	  [0] => Array(
                [ID] =>  bigint // Product ID in wishlist
                [wishlist_id] => bigint
                [product_id] => bigint
                [variation_id] => bigint
                [author] => bigint // WP user ID
                [date] => datetime
                [quantity] => int
                [price] => float
                [in_stock] => int
                [data] => WC_Product Object
                [meta] => Array() // Custom product fields
              )
    	*/
    	$products = $wishlist_products->get();

    Kind regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Get all product data from wishlist products’ is closed to new replies.