From 2df32fdb3c24852b62e5b34b7ac6ae02709251b8 Mon Sep 17 00:00:00 2001 From: Aleksandrs Date: Mon, 11 Oct 2021 14:56:31 +0300 Subject: [PATCH] Code clean --- src/Model/Resolver/GetStores.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Model/Resolver/GetStores.php b/src/Model/Resolver/GetStores.php index 6f85b22..48141f2 100755 --- a/src/Model/Resolver/GetStores.php +++ b/src/Model/Resolver/GetStores.php @@ -146,7 +146,7 @@ public function resolve( throw new GraphQlInputException(__('No in-delivery support for provided country. Please select another country.')); } - $searchRequest = $this->getStoresBySearch($search, $country, $args); + $searchRequest = $this->getStoresBySearch($args); } try { @@ -193,13 +193,13 @@ public function getAllStores($args) { * @return SearchRequestInterface * @throws LocalizedException */ - public function getStoresBySearch($search, $country, $args) { + public function getStoresBySearch($args) { $searchRequest = $this->searchRequest ->setScopeType(SalesChannelInterface::TYPE_WEBSITE) ->setAreaSearchTerm(sprintf( '%s:%s', - $search, - $country + $args['search'], + $args['country'] )) ->setPageSize(50) ->setScopeCode($this->storeManager->getWebsite()->getCode())