yith_wcwl_count_products

Retrieve the number of products in the wishlist.

Description

(int) yith_wcwl_count_products( (bool) $wishlist_token = false ); 

Returns (int)

Parameters (1)

0. $wishlist_token — Optional. (bool) => false
String|bool Optional wishlist token

Usage

  1. if ( !function_exists( 'yith_wcwl_count_products' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yith-woocommerce-wishlist/includes/functions.yith-wcwl.php'; 
  3.  
  4. // string|bool Optional wishlist token 
  5. $wishlist_token = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = yith_wcwl_count_products($wishlist_token); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/functions.yith-wcwl.php  
  1. function yith_wcwl_count_products( $wishlist_token = false ) { 
  2. return YITH_WCWL()->count_products( $wishlist_token );