woocommerce_quantity_input_step filter-hookWC 10.1.0

Filters the step for the quantity input for this product.

Usage

add_filter( 'woocommerce_quantity_input_step', 'wp_kama_woocommerce_quantity_input_step_filter', 10, 2 );

/**
 * Function for `woocommerce_quantity_input_step` filter-hook.
 * 
 * @param int|float   $step The step.
 * @param \WC_Product $that The product object.
 *
 * @return int|float
 */
function wp_kama_woocommerce_quantity_input_step_filter( $step, $that ){

	// filter...
	return $step;
}
$step(int|float)
The step.
$that(\WC_Product)
The product object.

Changelog

Since 10.1.0 Introduced.

Where the hook is called

WC_Product::get_purchase_quantity_step()
woocommerce_quantity_input_step
wc_get_quantity_input_args()
woocommerce_quantity_input_step
woocommerce/includes/abstracts/abstract-wc-product.php 2076
return wc_stock_amount( apply_filters( 'woocommerce_quantity_input_step', 1, $this ) );
woocommerce/includes/wc-template-functions.php 4463
$defaults['step']         = apply_filters( 'woocommerce_quantity_input_step', 1, $product );

Where the hook is used in WooCommerce

Usage not found.