From d72143033609f351695285fbd67f031cb5125180 Mon Sep 17 00:00:00 2001 From: Egorka Date: Mon, 3 Sep 2018 22:28:27 +0300 Subject: [PATCH] Remove MailChimp default subscribe --- common/bootstrap/SetUp.php | 10 ++++++---- core/services/newsletter/FakeSubscribe.php | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 core/services/newsletter/FakeSubscribe.php diff --git a/common/bootstrap/SetUp.php b/common/bootstrap/SetUp.php index 2492bb1..7a080c7 100644 --- a/common/bootstrap/SetUp.php +++ b/common/bootstrap/SetUp.php @@ -24,6 +24,7 @@ use core\listeners\user\UserSignupConfirmedListener; use core\listeners\user\UserSignupRequestedListener; //use shop\repositories\events\EntityPersisted; //use shop\repositories\events\EntityRemoved; +use core\services\newsletter\FakeSubscribe; use core\services\newsletter\MailChimp; use core\services\newsletter\Newsletter; //use shop\services\sms\LoggedSender; @@ -91,10 +92,11 @@ class SetUp implements BootstrapInterface ]);*/ $container->setSingleton(Newsletter::class, function () use ($app) { - return new MailChimp( - new \DrewM\MailChimp\MailChimp($app->params['mailChimpKey']), - $app->params['mailChimpListId'] - ); + //return new MailChimp( + // new \DrewM\MailChimp\MailChimp($app->params['mailChimpKey']), + // $app->params['mailChimpListId'] + //); + return new FakeSubscribe(); }); /*$container->setSingleton(SmsSender::class, function () use ($app) { diff --git a/core/services/newsletter/FakeSubscribe.php b/core/services/newsletter/FakeSubscribe.php new file mode 100644 index 0000000..20096a7 --- /dev/null +++ b/core/services/newsletter/FakeSubscribe.php @@ -0,0 +1,20 @@ +