Skip to content

Commit eb255c5

Browse files
authored
API revision bump (#324)
* API revision bump * bumps revision to newest * version bump
1 parent 044c9f3 commit eb255c5

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,5 @@ fabric.properties
209209

210210
# pyenv
211211
.python-version
212+
213+
.DS_Store

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
#### Added
1111
- Add 'external_catalog_id' and 'integration_key' to Viewed Product and Added To Cart events.
1212

13+
#### Changed
14+
- Bumps Klaviyo API revision to 2025-04-15
15+
1316
#### Fixed
1417
- Fixed Deprecated use of base64_encode in Observer/SalesQuoteSaveAfter.php
1518
- Fixed profile identification on checkout page

Helper/Data.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ public function subscribeEmailToKlaviyoList($email, $firstName = null, $lastName
119119
'attributes' => array(
120120
'email' => $email,
121121
'subscriptions' => array(
122-
'email' => [
123-
'MARKETING'
124-
]
122+
'email' => array(
123+
'marketing' => array(
124+
"consent" => "SUBSCRIBED"
125+
)
126+
)
125127
)
126128
)
127129
);

KlaviyoV3Sdk/KlaviyoV3Api.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class KlaviyoV3Api
1414
* Host and versions
1515
*/
1616
const KLAVIYO_HOST = 'https://a.klaviyo.com/';
17-
const KLAVIYO_V3_REVISION = '2023-08-15';
17+
const KLAVIYO_V3_REVISION = '2025-04-15';
1818

1919
/**
2020
* Request methods
@@ -313,7 +313,14 @@ public function unsubscribeEmailFromKlaviyoList($email, $listId)
313313
array(
314314
self::TYPE_KEY_PAYLOAD => self::PROFILE_KEY_PAYLOAD,
315315
self::ATTRIBUTE_KEY_PAYLOAD => array(
316-
'email' => $email
316+
'email' => $email,
317+
'subscriptions' => array(
318+
'email' => array(
319+
'marketing' => array(
320+
"consent" => "UNSUBSCRIBED"
321+
)
322+
)
323+
)
317324
)
318325
)
319326
)

0 commit comments

Comments
 (0)