klaviyo / magento2-klaviyo

37 stars 51 forks source link

202302 tp165376 #231

Closed cykolln closed 1 year ago

cykolln commented 1 year ago

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:

  1. 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
  2. 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.
  3. 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.
  4. 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.
  5. 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:

NOTE: Please use the Changelogger cli tool to manage versioned file upgrades.

klaviyobot commented 1 year ago

https://klaviyo.tpondemand.com/entity/165376