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

feat(mailchimp): parse contact name into merge fields #1628

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

miguelpeixe
Copy link
Member

@miguelpeixe miguelpeixe commented Aug 28, 2024

All Submissions:

Changes proposed in this Pull Request:

This is part of the refactor in progress here: Automattic/newspack-plugin#3362

Incoming $contact['name'] should be transformed to populate the First Name and Last Name merge fields.

How to test the changes in this Pull Request:

  1. Checkout this branch and feat(ras): sync class newspack-plugin#3362
  2. With RAS configured, visit your site in a fresh session
  3. Donate with a new reader account
  4. Confirm the sync goes through with "First Name" and "Last Name" merge fields populated

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?

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 20.81%. Comparing base (bd6fe39) to head (742ee08).
Report is 38 commits behind head on trunk.

Files with missing lines Patch % Lines
...mailchimp/class-newspack-newsletters-mailchimp.php 20.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk    #1628      +/-   ##
============================================
- Coverage     20.81%   20.81%   -0.01%     
- Complexity     2389     2391       +2     
============================================
  Files            46       46              
  Lines          8952     8957       +5     
============================================
+ Hits           1863     1864       +1     
- Misses         7089     7093       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@miguelpeixe miguelpeixe self-assigned this Sep 4, 2024
@miguelpeixe miguelpeixe marked this pull request as ready for review September 4, 2024 18:31
@miguelpeixe miguelpeixe requested a review from a team as a code owner September 4, 2024 18:31
@github-actions github-actions bot added [Status] Approved Ready to merge and removed [Status] Needs Review labels Sep 4, 2024
Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, too soon. I'm not seeing the First + Last Name fields in the logging output or the Mailchimp contact:

Screenshot 2024-09-04 at 4 06 42 PM Screenshot 2024-09-04 at 4 06 36 PM

EDIT: Actually, the above is user error. Let me take another pass through it

Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this is working—sorry about the back and forth. I didn't have all of the metadata fields enabled for syncing before.

@miguelpeixe miguelpeixe merged commit aeba65a into trunk Sep 6, 2024
16 checks passed
@miguelpeixe miguelpeixe deleted the feat/mailchimp-parse-name branch September 6, 2024 18:45
matticbot pushed a commit that referenced this pull request Sep 20, 2024
# [3.2.0-alpha.4](v3.2.0-alpha.3...v3.2.0-alpha.4) (2024-09-20)

### Bug Fixes

* a typo that came after a refactor ([#1656](#1656)) ([0ae5b61](0ae5b61))
* automatically retry failed scheduled sends ([#1660](#1660)) ([e0cca64](e0cca64))
* **cc:** urlencode query args before passing to CC API ([#1659](#1659)) ([4f645d2](4f645d2))
* dont send metadata on subscribe ([#1648](#1648)) ([5b4a059](5b4a059))
* handle encoded URLs and block patterns in redirect check ([#1635](#1635)) ([2fa5d16](2fa5d16))
* **mailchimp:** allow contacts to resubscribe after unsubscribing ([#1654](#1654)) ([b76dbc2](b76dbc2))

### Features

* **mailchimp:** parse contact name into merge fields ([#1628](#1628)) ([aeba65a](aeba65a))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.2.0-alpha.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Oct 8, 2024
# [3.2.0](v3.1.7...v3.2.0) (2024-10-08)

### Bug Fixes

* a typo that came after a refactor ([#1656](#1656)) ([0ae5b61](0ae5b61))
* dont send metadata on subscribe ([#1648](#1648)) ([5b4a059](5b4a059))
* handle missing Mailchimp API key ([83a0d6f](83a0d6f))
* **mailchimp:** allow contacts to resubscribe after unsubscribing ([#1654](#1654)) ([b76dbc2](b76dbc2))
* **phpcs:** specify path in custom ruleset ref ([#1637](#1637)) ([28f5b50](28f5b50))

### Features

* **mailchimp:** parse contact name into merge fields ([#1628](#1628)) ([aeba65a](aeba65a))
* **styling:** list styles ([e9ea4dd](e9ea4dd)), closes [#1335](#1335)

### Reverts

* "chore(deps-dev): bump @wordpress/browserslist-config from 6.5.0 to 6.6.0" ([f08f271](f08f271))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.2.0 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants