This PR fixes a bug where customers that hadn't confirmed their email for their Site account were getting unsubscribed in Klaviyo. This was happening because we weren't accounting for the other two order statuses in our observer file - as a result every subscription update where the customer wasn't explicitly subscribed resulted in them getting unsubscribed.
Manual Testing Steps
Tested the following scenerios:
Create a new account for a site that has account confirmation required enabled and opt in to the newsletter. The Klaviyo newsletter settings are set to use the Klaviyo Double Opt-in.
Verify that the profile has not been created on Klaviyo yet
Confirm account via the email
Verify that I've received the Klaviyo DOI email and once that is confirmed that the profile has been added to the list
Create a new account for a site that does not have account confirmation required enabled and opt in to the newsletter. The Klaviyo newsletter settings are set to use the Klaviyo Double Opt-in.
Verify that I've received the Klaviyo DOI email and once that is confirmed that the profile has been added to the list correctly in Klaviyo.
From an existing account on the store, update the newsletter settings to opt-out of emails.
verify that the profile has been unsubscribed in Klaviyo as expected.
From an existing account on the store, update the newsletter settings to opt in to emails.
verify that the profile has been resubscribed to klaviyo as expected after confirming via the DOI email.
While not logged into an account on the magento store, fill out the footer form
Verify that I've received the Klaviyo DOI email and once that is confirmed that the profile has been added to the list correctly in Klaviyo.
Pre-Submission Checklist:
[ ] You've updated the CHANGELOG following the steps here
[ ] Internal Only - If this is a release, please confirm the following:
[ ] The links in the changelog have been updated to point towards the new versions
[ ] The version has been incremented in the following places: module.xml and composer.json
NOTE: Please use the Changelogger cli tool to manage versioned file upgrades.
Description
This PR fixes a bug where customers that hadn't confirmed their email for their Site account were getting unsubscribed in Klaviyo. This was happening because we weren't accounting for the other two order statuses in our observer file - as a result every subscription update where the customer wasn't explicitly subscribed resulted in them getting unsubscribed.
Manual Testing Steps
Tested the following scenerios:
Pre-Submission Checklist:
NOTE: Please use the Changelogger cli tool to manage versioned file upgrades.