woocommerce_ajax_variation_threshold

woocommerce_ajax_variation_threshold

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_ajax_variation_threshold') is found 1 times:

  • /includes/wc-template-functions.php line 1754
    		// Enqueue variation scripts.
    		wp_enqueue_script( 'wc-add-to-cart-variation' );
    
    		// Get Available variations?
    		$get_variations = count( $product->get_children() ) <= apply_filters( 'woocommerce_ajax_variation_threshold', 30, $product );
    
    		// Load the template.
    		wc_get_template(
    			'single-product/add-to-cart/variable.php',
    			array(
    				'available_variations' => $get_variations ? $product->get_available_variations() : false,