WordPress at Your Fingertips
function is not described

WC_Product::is_on_backorder() public WC 1.0

Check if a product is on backorder.

{} It's a method of the class: WC_Product{}

No Hooks.

Return

true|false.

Usage

$WC_Product = new WC_Product();
$WC_Product->is_on_backorder( $qty_in_cart );
$qty_in_cart(int)
(default: 0).

Code of WC_Product::is_on_backorder() WC 5.8.0

public function is_on_backorder( $qty_in_cart = 0 ) {
	if ( 'onbackorder' === $this->get_stock_status() ) {
		return true;
	}

	return $this->managing_stock() && $this->backorders_allowed() && ( $this->get_stock_quantity() - $qty_in_cart ) < 0;
}