Browse Source

Remove MailChimp default subscribe

master
Egorka 6 years ago
parent
commit
d721430336
  1. 10
      common/bootstrap/SetUp.php
  2. 20
      core/services/newsletter/FakeSubscribe.php

10
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) {

20
core/services/newsletter/FakeSubscribe.php

@ -0,0 +1,20 @@
<?php
/**
* Created by Error202
* Date: 03.09.2018
*/
namespace core\services\newsletter;
class FakeSubscribe implements Newsletter
{
public function subscribe($email): void
{
return;
}
public function unsubscribe($email): void
{
return;
}
}
Loading…
Cancel
Save