diff --git a/Model/Indexer/CategoryObserver.php b/Model/Indexer/CategoryObserver.php index 8b969aa0b..68fb9198e 100755 --- a/Model/Indexer/CategoryObserver.php +++ b/Model/Indexer/CategoryObserver.php @@ -54,6 +54,11 @@ public function afterSave( CategoryResourceModel $result, CategoryModel $category ) { + if (!$this->configHelper->getApplicationID() + || !$this->configHelper->getAPIKey() + || !$this->configHelper->getSearchOnlyAPIKey()) { + return $result; + } $categoryResource->addCommitCallback(function () use ($category) { $collectionIds = []; // To reduce the indexing operation for products, only update if these values have changed