What happened?
When a returning customer has previously opted in to marketing, but then opts out, the correct value is not reflected in the API webhook data (it's true instead of false).
I'm not sure if this is a bug in the JS front-end library or the Node back end library. The bug seems to present in the API, so that's why I'm raising it here. Let me know if I need to raise it in the JS library instead (would that be the PaddleHQ/paddle-js-wrapper repo?)
"@paddle/paddle-js": "~1.6.2",
"@paddle/paddle-node-sdk": "~3.6.1",
Steps to reproduce
Where notification: CustomerNotification
- Pass
customer: { email: customerEmail }, to paddle.Checkout.open
- Open checkout modal
- Opt in to marketing and click "Continue"
- Wait for
EventName.CustomerCreated webhook
- See that
notification.marketingConsent is true
- Refresh the page
- Open checkout modal
- Uncheck the marketing consent in the modal
- Click "Continue"
- Wait for
EventName.CustomerUpdated
What did you expect to happen?
Expected: notification.marketingConsent is false (it was unchecked in the modal)
Actual: notification.marketingConsent is true
Workaround:
- On the modal click "Your details" to go back to the first screen
- Notice how the opt-in is re-checked (suggesting maybe this actually is a bug in the JS modal)
- Un-check the marketing consent checkbox a 2nd time
- Click "Continue"
- Wait for
EventName.CustomerUpdated
- The
notification.marketingConsent is true
What happened?
When a returning customer has previously opted in to marketing, but then opts out, the correct value is not reflected in the API webhook data (it's
trueinstead offalse).I'm not sure if this is a bug in the JS front-end library or the Node back end library. The bug seems to present in the API, so that's why I'm raising it here. Let me know if I need to raise it in the JS library instead (would that be the
PaddleHQ/paddle-js-wrapperrepo?)Steps to reproduce
Where
notification: CustomerNotificationcustomer: { email: customerEmail },topaddle.Checkout.openEventName.CustomerCreatedwebhooknotification.marketingConsentis trueEventName.CustomerUpdatedWhat did you expect to happen?
Expected:
notification.marketingConsentisfalse(it was unchecked in the modal)Actual:
notification.marketingConsentistrueWorkaround:
EventName.CustomerUpdatednotification.marketingConsentistrue