fix(mc): handle standard merge fields when fixing duplicates #3637
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
First Name
,Last Name
,Phone
, andAddress
. 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.wp newspack mailchimp merge-fields fix-duplicates --dry-run
and confirm that the duplicate fields are reported.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: