Refactor SubscriberActions:subscribe to return status of confirmation email
We need to pass the error or success info about the confirmation email in order to be able to be able to display the error message. [MAILPOET-4736]
This commit is contained in:
committed by
Aschepikov
parent
970db8f0d8
commit
ee83e4d748
@ -700,6 +700,7 @@ class Subscriber extends Model {
|
||||
public static function subscribe($subscriberData = [], $segmentIds = []) {
|
||||
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($subscriberData, $segmentIds);
|
||||
[$subscriber] = $service->subscribe($subscriberData, $segmentIds);
|
||||
return $subscriber;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user