diff --git a/Model/Autocomplete/DataProvider/SuggestionDataProvider.php b/Model/Autocomplete/DataProvider/SuggestionDataProvider.php index dffe72f7..e838cf11 100644 --- a/Model/Autocomplete/DataProvider/SuggestionDataProvider.php +++ b/Model/Autocomplete/DataProvider/SuggestionDataProvider.php @@ -94,26 +94,22 @@ public function getItems() $category = $this->dataProviderHelper->getCategory(); $promises = []; - if ($this->config->isAutocompleteSuggestionsEnabled()) { - $suggestionsRequest = $this->suggestionRequestFactory->create(); - $suggestionsRequest->setSearch($query); - $suggestionsRequest->addCategoryFilter($category); - $promises['suggestions'] = $this->client->request( - $suggestionsRequest, - true - ); - } - - if ($this->config->isAutocompleteProductsEnabled()) { - /** @var ProductSuggestionsRequest $productSuggestionRequest */ - $productSuggestionsRequest = $this->productSuggestionRequestFactory->create(); - $productSuggestionsRequest->setSearch($query); - $productSuggestionsRequest->addCategoryFilter($category); - $promises['product_suggestions'] = $this->client->request( - $productSuggestionsRequest, - true - ); - } + $suggestionsRequest = $this->suggestionRequestFactory->create(); + $suggestionsRequest->setSearch($query); + $suggestionsRequest->addCategoryFilter($category); + $promises['suggestions'] = $this->client->request( + $suggestionsRequest, + true + ); + + /** @var ProductSuggestionsRequest $productSuggestionRequest */ + $productSuggestionsRequest = $this->productSuggestionRequestFactory->create(); + $productSuggestionsRequest->setSearch($query); + $productSuggestionsRequest->addCategoryFilter($category); + $promises['product_suggestions'] = $this->client->request( + $productSuggestionsRequest, + true + ); if (empty($promises)) { return [];