WC_Product::get_max_purchase_quantity()

Get max quantity which can be purchased at once.


Description Description


Return Return

(int) Quantity or -1 if unlimited.


Top ↑

Source Source

File: includes/abstracts/abstract-wc-product.php

	public function get_max_purchase_quantity() {
		return $this->is_sold_individually() ? 1 : ( $this->backorders_allowed() || ! $this->managing_stock() ? -1 : $this->get_stock_quantity() );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.