yit_get_products

The YITH WooCommerce Wishlist yit get products function.

Description

yit_get_products( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'yit_get_products' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yith-woocommerce-wishlist/plugin-fw/yit-woocommerce-compatibility.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = yit_get_products($args); 
  9.  

Defined (1)

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

/plugin-fw/yit-woocommerce-compatibility.php  
  1. function yit_get_products( $args ) { 
  2. if ( version_compare( WC()->version, '2.7', '<' ) ) { 
  3. $args[ 'fields' ] = 'objects'; 
  4. $posts = get_posts( $args ); 
  5.  
  6. return array_map( 'wc_get_product', $posts ); 
  7. } else { 
  8. return wc_get_products( $args );