fix variation is_on_backorder when parent manages stock
This commit is contained in:
parent
0eb1c4f846
commit
55f4a846db
|
@ -561,7 +561,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
if ( true === $this->managing_stock() ) {
|
||||
return parent::is_on_backorder( $qty_in_cart );
|
||||
} else {
|
||||
return $this->parent->is_on_backorder( $qty_in_cart );
|
||||
return $this->parent->managing_stock() && $this->parent->backorders_allowed() && ( $this->parent->get_stock_quantity() - $qty_in_cart ) < 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue