Skip to content

Commit 328db87

Browse files
committed
fix: getResponse update subscriber issue
1 parent 0702b57 commit 328db87

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

includes/Actions/GetResponse/RecordApiHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
namespace BitCode\FI\Actions\GetResponse;
88

9-
use BitCode\FI\Log\LogHandler;
109
use BitCode\FI\Core\Util\Common;
1110
use BitCode\FI\Core\Util\Helper;
1211
use BitCode\FI\Core\Util\HttpHelper;
12+
use BitCode\FI\Log\LogHandler;
1313

1414
/**
1515
* Provide functionality for Record insert, upsert
@@ -95,11 +95,11 @@ public function addContactToCampaign($auth_token, $selectedTags, $finalData, $ca
9595
}
9696
}
9797

98-
$isExist = $this->existSubscriber($auth_token, $finalData['email']);
99-
$shouldUpdate = !empty($existing[0]->contactId) && !empty($this->_integrationDetails->actions->update);
98+
$existSubscriber = $this->existSubscriber($auth_token, $finalData['email']);
99+
$shouldUpdate = !empty($existSubscriber[0]->contactId) && !empty($this->_integrationDetails->actions->update);
100100

101101
if ($shouldUpdate) {
102-
$contactId = $isExist[0]->contactId;
102+
$contactId = $existSubscriber[0]->contactId;
103103
$apiEndpoints = $this->baseUrl . "contacts/{$contactId}";
104104

105105
$requestParams['tags'] = $this->getFormattedTags($contactId, $requestParams['tags']);

0 commit comments

Comments
 (0)