From 9a266acbef7ced80951873997f5c1b0ed09c8bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=A1=E9=83=A8=20=E5=80=AB=E5=A4=AA=E9=83=8E?= Date: Fri, 9 Oct 2020 18:44:44 +0300 Subject: [PATCH] remove stockprocessor which become redundant after fixing show out of stock product variants (#68) --- .../CollectionProcessor/StockProcessor.php | 50 ------------------- src/etc/di.xml | 3 -- 2 files changed, 53 deletions(-) delete mode 100644 src/Model/Resolver/Products/DataProvider/Product/CollectionProcessor/StockProcessor.php diff --git a/src/Model/Resolver/Products/DataProvider/Product/CollectionProcessor/StockProcessor.php b/src/Model/Resolver/Products/DataProvider/Product/CollectionProcessor/StockProcessor.php deleted file mode 100644 index d2337ae..0000000 --- a/src/Model/Resolver/Products/DataProvider/Product/CollectionProcessor/StockProcessor.php +++ /dev/null @@ -1,50 +0,0 @@ -stockConfig = $stockConfig; - $this->stockStatusResource = $stockStatusResource; - } - - public function process( - Collection $collection, - SearchCriteriaInterface $searchCriteria, - array $attributeNames - ): Collection { - $singleProduct = CriteriaCheck::isSingleProductFilter($searchCriteria); - if (!$singleProduct && !$this->stockConfig->isShowOutOfStock()) { - $this->stockStatusResource->addIsInStockFilterToCollection($collection); - } - - return $collection; - } -} \ No newline at end of file diff --git a/src/etc/di.xml b/src/etc/di.xml index 1432dbb..56fcfea 100755 --- a/src/etc/di.xml +++ b/src/etc/di.xml @@ -15,9 +15,6 @@ - -