6 declare(strict_types=1);
25 private $isProductSalable;
30 private $getSkusByProductIds;
35 private $storeManager;
40 private $stockResolver;
54 $this->isProductSalable = $isProductSalable;
55 $this->getSkusByProductIds = $getSkusByProductIds;
57 $this->stockResolver = $stockResolver;
75 ? $this->storeManager->getWebsite()->getCode()
76 : $this->storeManager->getWebsite($scopeId)->getCode();
80 return (
int)$this->isProductSalable->execute($sku, $stockId);
aroundGetProductStockStatus(StockRegistryInterface $subject, callable $proceed, $productId, $scopeId=null)
__construct(IsProductSalableInterface $isProductSalable, GetSkusByProductIdsInterface $getSkusByProductIds, StoreManagerInterface $storeManager, StockResolverInterface $stockResolver)
if(!isset($_GET['website_code'])) $websiteCode