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:
Emma Kalson
2020-03-19 13:25:04 +00:00
committed by Rostislav Wolný
parent ab44227c11
commit 31fc05dbfd

View File

@ -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 {