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(); }