Skip to content

Commit

Permalink
Fix another issue when using an env variable for the API key
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam committed Jun 24, 2019
1 parent f041814 commit bc58784
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/models/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace ether\mc\models;

use Craft;
use craft\base\Model;

/**
Expand Down Expand Up @@ -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);
}

}
}
3 changes: 1 addition & 2 deletions src/services/OrdersService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -351,4 +350,4 @@ private function _hasOptedIn (Order $order)
return false;
}

}
}

0 comments on commit bc58784

Please sign in to comment.