Return Subscriber::subscribe static method
This method is used by Thrive Leads plugin [MAILPOET-1865]
This commit is contained in:
committed by
M. Shull
parent
f128b2471d
commit
bee5e2f5d1
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace MailPoet\Models;
|
namespace MailPoet\Models;
|
||||||
|
|
||||||
|
use MailPoet\DI\ContainerWrapper;
|
||||||
use MailPoet\Settings\SettingsController;
|
use MailPoet\Settings\SettingsController;
|
||||||
use MailPoet\Subscribers\ConfirmationEmailMailer;
|
use MailPoet\Subscribers\ConfirmationEmailMailer;
|
||||||
use MailPoet\Util\Helpers;
|
use MailPoet\Util\Helpers;
|
||||||
@@ -808,4 +809,15 @@ class Subscriber extends Model {
|
|||||||
->orderByAsc('name')
|
->orderByAsc('name')
|
||||||
->findArray();
|
->findArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is here only for BC fix of 3rd party plugin integration.
|
||||||
|
* @see https://kb.mailpoet.com/article/195-add-subscribers-through-your-own-form-or-plugin
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
static function subscribe($subscriber_data = [], $segment_ids = []) {
|
||||||
|
trigger_error('Calling Subscriber::subscribe() is deprecated and will be removed. Use MailPoet\API\MP\v1\API instead. ', E_USER_DEPRECATED);
|
||||||
|
$service = ContainerWrapper::getInstance()->get(\MailPoet\Subscribers\SubscriberActions::class);
|
||||||
|
return $service->subscribe($subscriber_data, $segment_ids);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user