Automattic / Automattic/jetpack

Mailchimp: Disconnecting account doesn't fully remove the token

Open
#28,333 2 comments 0 reactions 0 assignees View on GitHub
[Block] Mailchimp [Feature] Mailchimp [Plugin] Jetpack [Pri] Low Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### Steps to Reproduce

You'll need two WordPress administrator accounts, two WordPress.com accounts and two admin-level Mailchimp accounts. This is the easiest way to see the issue.

1. Connect each WordPress admin account to a WordPress.com account.
3. In WordPress.com for the first account, go to Tools → Marketing → Connections.
4. Follow the prompts to connect Mailchimp to an MC administrator-level account.
5. Add the block to the site and confirm that it works.
6. Go back to Tools → Marketing → Connections and disconnect that account.
7. In Mailchimp, downgrade this MC account to Viewer.
8. Switch to the other Jetpack-connected admin account.
9. in WordPress.com go to Tools → Marketing → Connections.
10. Follow the prompts to connect Mailchimp to the second MC administrator-level account.
11. On the front-end, open the console → Network tab.
12. navigate to the post or page where you added the Mailchimp block and try to sign up. Note that you get this error:
Screen Shot 2023-01-11 at 9 34 33 AM
13. Check the failed call in the Network tab and this error:
Screen Shot 2023-01-11 at 9 34 33 AM
15. In the Mailchimp account, upgrade the first user to Admin.
16. Subscribe again and notice that it works.

### A clear and concise description of what you expected to happen.

When disconnecting from Mailchimp in one WordPress.com account, I should be able to connect to another Mailchimp account without issue.

### What actually happened

_No response_

### Browser

_No response_

### Other information

Newspack sites are heavy users of the Mailchimp block and they tend to experience a higher volume of staff turnover. This has now happened to at least three customers:

1. [Atavist Magazine](https://magazine.atavist.com/) switched to the MC4WP plugin.
2. https://enlacelatinonc.org/ switched to the MC4WP plugin.
3. https://washingtoncitypaper.com/ had to upgrade the MC account for their former admin in order for the Jetpack block to resume functioning. They are heavy users of the Mailchimp block so a switch is not an option.

### Platform (Simple, Atomic, or both?)

Self-hosted

### Reproducibility

Consistent

### Severity

Most (> 50%)

### Available workarounds?

None

### Workaround details

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Mailchimp connection flow through WordPress.com Tools → Marketing → Connections, then inspect the failed signup request in the browser Network tab after disconnecting and reconnecting accounts. Done means disconnecting the first account fully removes its token so the Mailchimp block works with the second account without upgrading the former user.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.