diff --git a/src/Configuration/Service/Ps17PsConfigurationService.php b/src/Configuration/Service/Ps17PsConfigurationService.php index 58b041d9..35962087 100644 --- a/src/Configuration/Service/Ps17PsConfigurationService.php +++ b/src/Configuration/Service/Ps17PsConfigurationService.php @@ -74,6 +74,8 @@ public function has(string $key, ShopConstraint $shopConstraint = null): bool */ public function set(string $key, $value, ShopConstraint $shopConstraint = null): void { - $this->configurationService->set($key, json_encode($value), $shopConstraint); + $storableValue = is_scalar($value) ? $value : json_encode($value); + + $this->configurationService->set($key, $storableValue, $shopConstraint); } } diff --git a/src/Pdk/Settings/Repository/PdkSettingsRepository.php b/src/Pdk/Settings/Repository/PdkSettingsRepository.php index b0c3a599..3a3d79fb 100644 --- a/src/Pdk/Settings/Repository/PdkSettingsRepository.php +++ b/src/Pdk/Settings/Repository/PdkSettingsRepository.php @@ -52,5 +52,6 @@ public function store(string $key, $value): void } $this->configurationService->set($key, $value); + $this->save($key, $value); } }