diff --git a/core/components/commerce_dynamictaxmode/docs/changelog.txt b/core/components/commerce_dynamictaxmode/docs/changelog.txt index 827fdd7..7e6676f 100644 --- a/core/components/commerce_dynamictaxmode/docs/changelog.txt +++ b/core/components/commerce_dynamictaxmode/docs/changelog.txt @@ -1,3 +1,9 @@ +Dynamictaxmode for Commerce 1.0.0-rc3 +--------------------------------- +Released on 2024-03-29 + +- Make sure programmatically setting/getting value works as expected + Dynamictaxmode for Commerce 1.0.0-rc2 --------------------------------- Released on 2024-03-21 diff --git a/core/components/commerce_dynamictaxmode/model/commerce_dynamictaxmode/dynamictaxmodeproduct.class.php b/core/components/commerce_dynamictaxmode/model/commerce_dynamictaxmode/dynamictaxmodeproduct.class.php index a3cb5c5..ae9a5e8 100644 --- a/core/components/commerce_dynamictaxmode/model/commerce_dynamictaxmode/dynamictaxmodeproduct.class.php +++ b/core/components/commerce_dynamictaxmode/model/commerce_dynamictaxmode/dynamictaxmodeproduct.class.php @@ -181,7 +181,9 @@ protected function checkPricingInstance(comCurrency $currency, ProductPricing $i */ public function getRawBusinessPricing(): array { - return $this->getProperty('pricing_business') ?? []; + $raw = $this->getProperty('pricing_business'); + $raw = is_array($raw) ? $raw : json_decode($raw, true); + return $raw ?: []; } /** @@ -190,7 +192,7 @@ public function getRawBusinessPricing(): array */ protected function setRawBusinessPricing(array $pricing) { - $this->setProperty('pricing_business', json_encode($pricing)); + $this->setProperty('pricing_business', $pricing); } /**