Skip to content

Commit 82619d5

Browse files
authored
Merge pull request #21 from BitBagCommerce/UC-24
[UC-24] Change of the attribute responsible for the subscription
2 parents a943e80 + 7873c8b commit 82619d5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Builder/Payload/CustomerPayloadBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function build(string $email, ?CustomerInterface $customer = null, ?Addre
3333
'city' => $address?->getCity(),
3434
'gender' => null !== $customer ? self::GENDER_MAP[$customer->getGender()] : null,
3535
'status' => null !== $customer ? self::STATUS_USER : self::STATUS_VISITOR,
36-
'unsubscribed' => null !== $customer ? !$customer->isSubscribedToNewsletter() : null,
36+
'email_consent' => $customer?->isSubscribedToNewsletter(),
3737
];
3838

3939
return array_filter($payload, fn ($value) => null !== $value);

0 commit comments

Comments
 (0)