From 212b02ffb892d5e7be1cf56cd4bcd4ad402bf564 Mon Sep 17 00:00:00 2001 From: Hannah De Wachter Date: Mon, 24 Jun 2024 11:41:21 +0200 Subject: [PATCH] Fix getSettings --- src/controllers/SubscribeController.php | 2 +- src/services/CampaignMonitorService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/SubscribeController.php b/src/controllers/SubscribeController.php index eb61719..8dbbc63 100644 --- a/src/controllers/SubscribeController.php +++ b/src/controllers/SubscribeController.php @@ -15,7 +15,7 @@ class SubscribeController extends Controller public function actionIndex(): ?\yii\web\Response { /* @var Settings $settings */ - $settings = CampaignMonitor::$plugin->getSettingsResponse(); + $settings = CampaignMonitor::getInstance()->getSettings(); if (!$settings->checkSettings()) { Craft::$app->getSession()->setError(Craft::t('site', "Please provide an API key and Client ID")); return $this->asFailure(Craft::t('site', "Please provide an API key and Client ID")); diff --git a/src/services/CampaignMonitorService.php b/src/services/CampaignMonitorService.php index f3fcf99..0f1871a 100644 --- a/src/services/CampaignMonitorService.php +++ b/src/services/CampaignMonitorService.php @@ -12,7 +12,7 @@ class CampaignMonitorService extends Component public function init(): void { parent::init(); - $settings = CampaignMonitor::$plugin->getSettingsResponse(); + $settings = CampaignMonitor::getInstance()->getSettings(); $this->apiKey = $settings->getApiKey(); }