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.

Метод класса: WC_Product{}

Хуки из метода

Возвращает

int|float.

Использование

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

Список изменений

С версии 10.1.0 Введена.

Код WC_Product::get_purchase_quantity_step() WC 11.0.1

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 ) );
}