woocommerce_product_query_max_rand_cache_count
Usage
add_filter( 'woocommerce_product_query_max_rand_cache_count', 'wp_kama_woocommerce_product_query_max_rand_cache_count_filter' );
/**
* Function for `woocommerce_product_query_max_rand_cache_count` filter-hook.
*
* @param $5
*
* @return
*/
function wp_kama_woocommerce_product_query_max_rand_cache_count_filter( $5 ){
// filter...
return $5;
}
- $5
- -
Where the hook is called
woocommerce_product_query_max_rand_cache_count
woocommerce/includes/shortcodes/class-wc-shortcode-products.php 552
$rand_index = wp_rand( 0, max( 1, absint( apply_filters( 'woocommerce_product_query_max_rand_cache_count', 5 ) ) ) );