Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mc): handle standard merge fields when fixing duplicates #3637

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Dec 18, 2024

All Submissions:

Changes proposed in this Pull Request:

Allows our script to consolidate and fix duplicate merge fields to also handle standard Mailchimp merge fields (First/Last Name, Phone, Address) in addition to Newspack-specific fields.

How to test the changes in this Pull Request:

  1. In your connected Mailchimp audience, create duplicate merge fields for First Name, Last Name, Phone, and Address. These fields usually exist for every Mailchimp audience and can also be a part of our contact metadata payload, which means they could be duplicated by our sync methods.
  2. Fill out these fields for some existing contacts in your audience.
  3. Run wp newspack mailchimp merge-fields fix-duplicates --dry-run and confirm that the duplicate fields are reported.
  4. Run wp newspack mailchimp merge-fields fix-duplicates and confirm that the duplicate fields are deleted in Mailchimp, and that the info you filled out in step 2 get consolidated into the original instances of those fields.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo added the [Status] Needs Review The issue or pull request needs to be reviewed label Dec 18, 2024
@dkoo dkoo self-assigned this Dec 18, 2024
@dkoo dkoo requested a review from a team as a code owner December 18, 2024 17:04
@dkoo dkoo marked this pull request as draft December 18, 2024 17:28
@dkoo dkoo marked this pull request as ready for review December 18, 2024 21:50
@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Jan 10, 2025
@dkoo
Copy link
Contributor Author

dkoo commented Jan 16, 2025

Whoops, forgot about this one. Updating for a merge

@dkoo dkoo merged commit 80248a2 into release Jan 16, 2025
7 checks passed
@dkoo dkoo deleted the fix/handle-standard-mc-field-duplicates branch January 16, 2025 17:03
matticbot pushed a commit that referenced this pull request Jan 16, 2025
## [5.11.2](v5.11.1...v5.11.2) (2025-01-16)

### Bug Fixes

* **mc:** handle standard MC merge fields when fixing duplicates ([#3637](#3637)) ([80248a2](80248a2))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 5.11.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Jan 16, 2025
# [5.12.0-alpha.2](v5.12.0-alpha.1...v5.12.0-alpha.2) (2025-01-16)

### Bug Fixes

* **mc:** handle standard MC merge fields when fixing duplicates ([#3637](#3637)) ([80248a2](80248a2))
* **wcs:** migrate-expired-subscriptions handle manual subscriptions ([#3663](#3663)) ([e0f32e8](e0f32e8))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 5.12.0-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @alpha released [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants