woocommerce_quantity_input_min

woocommerce_quantity_input_min

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_quantity_input_min') is found 4 times:

  • /includes/wc-template-functions.php line 1914
    			'input_name'   => 'quantity',
    			'input_value'  => '1',
    			'classes'      => apply_filters( 'woocommerce_quantity_input_classes', array( 'input-text', 'qty', 'text' ), $product ),
    			'max_value'    => apply_filters( 'woocommerce_quantity_input_max', -1, $product ),
    			'min_value'    => apply_filters( 'woocommerce_quantity_input_min', 0, $product ),
    			'step'         => apply_filters( 'woocommerce_quantity_input_step', 1, $product ),
    			'pattern'      => apply_filters( 'woocommerce_quantity_input_pattern', has_filter( 'woocommerce_stock_amount', 'intval' ) ? '[0-9]*' : '' ),
    			'inputmode'    => apply_filters( 'woocommerce_quantity_input_inputmode', has_filter( 'woocommerce_stock_amount', 'intval' ) ? 'numeric' : '' ),
    			'product_name' => $product ? $product->get_title() : '',
    			'placeholder'  => apply_filters( 'woocommerce_quantity_input_placeholder', '', $product ),
    			// When autocomplete is enabled in firefox, it will overwrite actual value with what user entered last. So we default to off.
    
  • /templates/single-product/add-to-cart/grouped.php line 75
    								woocommerce_quantity_input(
    									array(
    										'input_name'  => 'quantity[' . $grouped_product_child->get_id() . ']',
    										'input_value' => isset( $_POST['quantity'][ $grouped_product_child->get_id() ] ) ? wc_stock_amount( wc_clean( wp_unslash( $_POST['quantity'][ $grouped_product_child->get_id() ] ) ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification.Missing
    										'min_value'   => apply_filters( 'woocommerce_quantity_input_min', 0, $grouped_product_child ),
    										'max_value'   => apply_filters( 'woocommerce_quantity_input_max', $grouped_product_child->get_max_purchase_quantity(), $grouped_product_child ),
    										'placeholder' => '0',
    									)
    								);
    
    								do_action( 'woocommerce_after_add_to_cart_quantity' );
    
  • /templates/single-product/add-to-cart/simple.php line 40
    		do_action( 'woocommerce_before_add_to_cart_quantity' );
    
    		woocommerce_quantity_input(
    			array(
    				'min_value'   => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
    				'max_value'   => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
    				'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(), // WPCS: CSRF ok, input var ok.
    			)
    		);
    
    		do_action( 'woocommerce_after_add_to_cart_quantity' );
    
  • /templates/single-product/add-to-cart/variation-add-to-cart-button.php line 22
    	do_action( 'woocommerce_before_add_to_cart_quantity' );
    
    	woocommerce_quantity_input(
    		array(
    			'min_value'   => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
    			'max_value'   => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
    			'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(), // WPCS: CSRF ok, input var ok.
    		)
    	);
    
    	do_action( 'woocommerce_after_add_to_cart_quantity' );