We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e78b90f commit 5fb0e87Copy full SHA for 5fb0e87
KlaviyoV3Sdk/KlaviyoV3Api.php
@@ -432,15 +432,18 @@ public function buildCustomerProperties($customerProperties)
432
433
$data = array(
434
self::TYPE_KEY_PAYLOAD => self::PROFILE_KEY_PAYLOAD,
435
- self::ATTRIBUTE_KEY_PAYLOAD => $kl_properties,
436
- self::PROPERTIES => $customerProperties,
+ self::ATTRIBUTE_KEY_PAYLOAD => $kl_properties
437
);
438
439
if (isset($customerProperties['$id'])) {
440
$data[self::ID_KEY_PAYLOAD] = $customerProperties['$id'];
441
unset($customerProperties['$id']);
442
}
443
+ if(!empty($customerProperties)) {
444
+ $data[self::ATTRIBUTE_KEY_PAYLOAD][self::PROPERTIES] = $customerProperties;
445
+ }
446
+
447
return array(
448
self::PROFILE_KEY_PAYLOAD => array(
449
self::DATA_KEY_PAYLOAD => $data
0 commit comments