WC_Product::is_in_stock()
Returns whether or not the product can be purchased.
Description Description
This returns true for ‘instock’ and ‘onbackorder’ stock statuses.
Return Return
(bool)
Source Source
File: includes/abstracts/abstract-wc-product.php
public function is_in_stock() { return apply_filters( 'woocommerce_product_is_in_stock', 'outofstock' !== $this->get_stock_status(), $this ); }