From 947ab3f0ae425033f5b34b9406e6d71f8f066ca1 Mon Sep 17 00:00:00 2001 From: Kenza Yamlahi Date: Wed, 6 Sep 2023 11:41:40 +0200 Subject: [PATCH] Fix passing parameters for method isValidateAdminValuesWithStoreOptionValues --- CHANGELOG.md | 4 ++-- src/Observers/AttributeOptionValueExportObserver.php | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 517d22e..3dcb63f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# Version 22.0.6 +# Version 22.0.7 ## Bugfixes -* Fix exception if no attribute values are defined on admin row +* Fix passing parameters for method `isValidateAdminValuesWithStoreOptionValues` # Version 22.0.5 diff --git a/src/Observers/AttributeOptionValueExportObserver.php b/src/Observers/AttributeOptionValueExportObserver.php index f34b5d3..2969fed 100644 --- a/src/Observers/AttributeOptionValueExportObserver.php +++ b/src/Observers/AttributeOptionValueExportObserver.php @@ -61,13 +61,17 @@ protected function process() }); // validate the admin values with the option values - if (count($attributeOptionValues) === 0 || !$this->isValidateAdminValuesWithStoreOptionValues($adminValueArtefacts, $attributeOptionValues)) { + if (count($attributeOptionValues) === 0) { // Skip the export if the store values are not valid return; } $adminValueArtefacts = $this->getArtefactsByTypeAndEntityId(AttributeOptionExportObserver::ARTEFACT_TYPE, $this->getLastEntityId()); + if (!$this->isValidateAdminValuesWithStoreOptionValues($adminValueArtefacts, $attributeOptionValues)){ + return; + } + // iterate over the attribute option values and export them foreach ($attributeOptionValues as $key => $attributeOptionValue) {