WC_Product::get_purchase_quantity_steppublicWC 10.1.0

The step for the quantity input and the multiple_of by which the quantity can be purchased.

Method of the class: WC_Product{}

Hooks from the method

Returns

Int|float.

Usage

$WC_Product = new WC_Product();
$WC_Product->get_purchase_quantity_step();

Changelog

Since 10.1.0 Introduced.

WC_Product::get_purchase_quantity_step() code WC 10.3.6

public function get_purchase_quantity_step() {
	/**
	 * Filters the step for the quantity input for this product.
	 *
	 * @since 10.1.0
	 * @param int|float $step The step.
	 * @param \WC_Product $this The product object.
	 * @return int|float The step.
	 */
	return wc_stock_amount( apply_filters( 'woocommerce_quantity_input_step', 1, $this ) );
}