diff --git a/CHANGELOG.md b/CHANGELOG.md index d03f142..89f0950 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.2 - 2019-06-24 +### Fixed +- Fix another issue when using an env variable for the API key + ## 1.0.1 - 2019-06-24 ### Fixed - Fix issue when using an env variable for the API key diff --git a/composer.json b/composer.json index b7e5e34..9792471 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "ether/mailchimp-commerce", "description": "Mailchimp integration with Craft Commerce", - "version": "1.0.1", + "version": "1.0.2", "type": "craft-plugin", "keywords": [ "mailchimp", diff --git a/src/models/Settings.php b/src/models/Settings.php index 945a477..add812a 100644 --- a/src/models/Settings.php +++ b/src/models/Settings.php @@ -8,6 +8,7 @@ namespace ether\mc\models; +use Craft; use craft\base\Model; /** @@ -118,8 +119,8 @@ public function getDataCenter () if (!$this->apiKey) return null; - $parts = explode('-', $this->apiKey); + $parts = explode('-', Craft::parseEnv($this->apiKey)); return end($parts); } -} \ No newline at end of file +} diff --git a/src/services/OrdersService.php b/src/services/OrdersService.php index bb34c5d..88520dd 100644 --- a/src/services/OrdersService.php +++ b/src/services/OrdersService.php @@ -14,7 +14,6 @@ use craft\commerce\elements\Order; use craft\commerce\Plugin as Commerce; use craft\helpers\Db; -use craft\helpers\Json; use craft\helpers\UrlHelper; use DateTime; use ether\mc\helpers\AddressHelper; @@ -351,4 +350,4 @@ private function _hasOptedIn (Order $order) return false; } -} \ No newline at end of file +}