woocommerce_ajax_variation_threshold

woocommerce_ajax_variation_threshold

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_ajax_variation_threshold') is found 1 times:

  • /includes/wc-template-functions.php line 1857
    		// 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,