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(segmentation): handle bad MC API key #1343

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

adekbadek
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

Adds handling of invalid Mailchimp API key.
Submitting as a hotfix, because the issue triggers PHP Fatals, which pollute our logs.

How to test the changes in this Pull Request:

  1. On release, update the value of the newspack_mailchimp_api_key option to an empty string
  2. Run wp eval "\Newspack_Popups_Segmentation::reader_logged_in(111, []);", observe a PHP Fatal is logged
  3. Switch to this branch, repeat, observe the Fatal is logged no more

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?

@adekbadek adekbadek requested a review from a team as a code owner September 3, 2024 08:51
@adekbadek adekbadek merged commit 34d4432 into release Sep 4, 2024
9 checks passed
@adekbadek adekbadek deleted the hotfix/handle-mc-key-error branch September 4, 2024 08:05
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.0.1 🎉

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