woocommerce_ajax_variation_threshold
Usage
add_filter( 'woocommerce_ajax_variation_threshold', 'wp_kama_woocommerce_ajax_variation_threshold_filter', 10, 2 );
/**
* Function for `woocommerce_ajax_variation_threshold` filter-hook.
*
* @param $30
* @param $product
*
* @return
*/
function wp_kama_woocommerce_ajax_variation_threshold_filter( $30, $product ){
// filter...
return $30;
}
- $30
- -
- $product
- -
Where the hook is called
woocommerce_ajax_variation_threshold
woocommerce/includes/wc-template-functions.php 2065
$get_variations = count( $product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 30, $product );