Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Plugins: Overwrites existing service keys when setting up a new plan #9320

Closed ryelle closed 7 years ago

ryelle commented 8 years ago

When going through the plugin setup process after buying a plan for a Jetpack site, we currently overwrite the API keys for Polldaddy and Akismet, if the user already has these config'd. This can lead to apparent loss of existing data (polls or stats), because the new keys have no history associated.

We've already addressed this in VaultPress by not registering the new key, plus the process of generating the key should fetch same key that the site already uses. Polldaddy generates a new key for this registration process, even if the site is already registered, and I don't think we can get around that. Akismet is only overwritten if the Jetpack site is connected to a different wp.com account than the existing Akismet key.

We could try to check if a plugin is already registered when trying to set it up, and notify the user of the existing connection - and have them contact support to untangle their plans? (so they aren't paying for multiple of the same product) I'm not sure how else we can help users to help themselves with this.

@johnHackworth @beaulebens @rickybanister (to think through what we should show users)

beaulebens commented 8 years ago

I would hope that it's a relatively rare occurrence, and that we're just running into it "a lot" because of testing sites, and running through things multiple times etc.

For the situation where it does happen though, I think we should defer to configuration that's already there, and not stomp it. In that case, we should probably just see that there's already an API key configured, skip that service and go on to the next one. At the end, maybe we can just display an informational message saying something like "Looks like you already have X configured, so we left it alone for now." and offer them a link to contact support to merge/migrate/cancel/whatever they need to actually do to clean things up (it'll depend on exactly what they want to do, so probably best to just let them sort it out with a HE).

rickybanister commented 8 years ago

I think I agree with @beaulebens's assessment here. The Identity Crisis solution came to mind when thinking of this:

'we noticed you already had VaultPress set up on this site, would you like to keep your current configuration: yes | no'

ryelle commented 7 years ago

I've added a PR for this in #9703.

I don't think we can do @rickybanister's suggestion right now because we need HE intervention to wrangle the multiple plans the user has.