File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
app/code/Magento/Catalog/ViewModel/Product/Checker Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ public function __construct(StockConfigurationInterface $stockConfiguration)
37
37
*/
38
38
public function isAvailableForCompare (ProductInterface $ product ): bool
39
39
{
40
- return $ this ->isInStock ($ product ) ||
41
- !$ this ->isInStock ($ product ) && $ this ->stockConfiguration ->isShowOutOfStock ();
40
+ return $ this ->isInStock ($ product ) || $ this ->stockConfiguration ->isShowOutOfStock ();
42
41
}
43
42
44
43
/**
@@ -54,8 +53,6 @@ private function isInStock(ProductInterface $product): bool
54
53
return $ product ->isSalable ();
55
54
}
56
55
57
- return isset ($ quantityAndStockStatus ['is_in_stock ' ])
58
- ? $ quantityAndStockStatus ['is_in_stock ' ]
59
- : false ;
56
+ return isset ($ quantityAndStockStatus ['is_in_stock ' ]) && $ quantityAndStockStatus ['is_in_stock ' ];
60
57
}
61
58
}
You can’t perform that action at this time.
0 commit comments