Merge pull request #11932 from franticpsyx/fix-variation-on-backorder-with-parent-managing-stock
[2.6] Variation is_on_backorder fails when parent manages stock and child doesn't...
This commit is contained in:
commit
1fbc48abeb
|
@ -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