woocommerce_quantity_input_min

The WooCommerce woocommerce quantity input min hook.

Description

apply_filters( 'woocommerce_quantity_input_min', (unknown) $product_get_min_purchase_quantity, (unknown) $product ); 

Parameters (2)

0. $product_get_min_purchase_quantity (unknown)
The product get min purchase quantity.
1. $product (unknown)
The product.

Usage

To run the hook, copy the example below.
  1. $product_get_min_purchase_quantity = apply_filters( 'woocommerce_quantity_input_min', $product_get_min_purchase_quantity, $product ); 
  2.  
  3. if ( !empty( $product_get_min_purchase_quantity ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_quantity_input_min callback 
  2. function filter_woocommerce_quantity_input_min( $product_get_min_purchase_quantity, $product ) { 
  3. // make filter magic happen here... 
  4. return $product_get_min_purchase_quantity
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_quantity_input_min', 'filter_woocommerce_quantity_input_min', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_quantity_input_min', 'filter_woocommerce_quantity_input_min', 10, 2 ); 

Defined (4)

The filter is defined in the following location(s).

/templates/single-product/add-to-cart/variation-add-to-cart-button.php  
  1. 'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ), 
/templates/single-product/add-to-cart/simple.php  
  1. 'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ), 
/templates/single-product/add-to-cart/grouped.php  
  1. 'min_value' => apply_filters( 'woocommerce_quantity_input_min', 0, $grouped_product ), 
/includes/wc-template-functions.php  
  1. 'min_value' => apply_filters( 'woocommerce_quantity_input_min', 0, $product ),