WC_Product::has_enough_stock( mixed $quantity )
Returns whether or not the product has enough stock for the order.
Description Description
Parameters Parameters
- $quantity
-
(Required) Quantity of a product added to an order.
Return Return
(bool)
Source Source
File: includes/abstracts/abstract-wc-product.php
public function has_enough_stock( $quantity ) { return ! $this->managing_stock() || $this->backorders_allowed() || $this->get_stock_quantity() >= $quantity; }