woocommerce_graphflow_recommended_products_total

The WooCommerce Recommendations by Graphflow woocommerce graphflow recommended products total hook.

Description

apply_filters( 'woocommerce_graphflow_recommended_products_total', (unknown) $gf_num ); 

Parameters (1)

0. $gf_num (unknown)
The gf num.

Usage

To run the hook, copy the example below.
  1. $gf_num = apply_filters( 'woocommerce_graphflow_recommended_products_total', $gf_num ); 
  2.  
  3. if ( !empty( $gf_num ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_graphflow_recommended_products_total callback 
  2. function filter_woocommerce_graphflow_recommended_products_total( $gf_num ) { 
  3. // make filter magic happen here... 
  4. return $gf_num
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_graphflow_recommended_products_total', 'filter_woocommerce_graphflow_recommended_products_total', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_graphflow_recommended_products_total', 'filter_woocommerce_graphflow_recommended_products_total', 10, 1 ); 

Defined (3)

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

/templates/single-product/graphflow-recommended-products.php  
  1. $gf_recommendations = $GLOBALS['wc_graphflow']->get_api()->get_product_recommendations( $gf_product_id, $gf_user, apply_filters( 'woocommerce_graphflow_recommended_products_total', $gf_num ), $filters ); 
  1. $gf_recommendations = $GLOBALS['wc_graphflow']->get_api()->get_user_recommendations( $gf_user, apply_filters( 'woocommerce_graphflow_recommended_products_total', $gf_num ), $filters ); 
  1. $gf_products = array_slice( $gf_products, 0, apply_filters( 'woocommerce_graphflow_recommended_products_total', $gf_num ) );