Updated variable name
Updated $getsubscriber to $get_subscriber for coding compliance and to ensure that $subscriber array isn't overwritten.
This commit is contained in:
committed by
Rostislav Wolný
parent
ab44227c11
commit
31fc05dbfd
@ -38,11 +38,11 @@ if (class_exists(\MailPoet\API\API::class)) {
|
||||
|
||||
// Check if subscriber exists. If subscriber doesn't exist an exception is thrown
|
||||
try {
|
||||
$getsubscriber = $mailpoet_api->getSubscriber($subscriber['email']);
|
||||
$get_subscriber = $mailpoet_api->getSubscriber($subscriber['email']);
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
try {
|
||||
if (!$getsubscriber) {
|
||||
if (!$get_subscriber) {
|
||||
// Subscriber doesn't exist let's create one
|
||||
$mailpoet_api->addSubscriber($subscriber, $list_ids);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user