Wp-calypso: Me: presence of premium themes should not prevent closure of account

Created on 5 Sep 2018  ·  17Comments  ·  Source: Automattic/wp-calypso

Steps to reproduce

Using an account containing a site with a premium theme:

  1. Starting at URL: https://wordpress.com/me/account/close

What I expected

It is possible to delete the account.

What happened instead

screen shot 2018-09-05 at 12 18 25

The copy instructs the user to cancel active purchases before deleting the account, but it is not possible to cancel a premium theme (it's a one-time purchase).

Context / Source


Reported by a user in 1392647-zen.

When checking whether an account has active purchases, we should probably ignore premium themes.

cc @westi

Me PrivacGDPR [Type] Bug

All 17 comments

Also related to #17012

Another case from the forums

@bluefuton it looks like there might be a regression here: In https://en.forums.wordpress.com/topic/delete-my-account-permanently-10/ a user reported being unable to close their account. After an HE removed the premium theme (bought in 2015, so definitely non-refundable), they were able to close the account.

I've seen several users contact us in the forums the past two weeks about being unable to close their accounts, but this is the first case I've been able to confirm that it works after the theme is removed.

I'm able to replicate the issue, using the same testing steps as I'd used when reviewing #27411:

  • Created a new account and site
  • Purchase a Premium Theme using credits so it's non-refundable
  • Confirm theme appears on Purchases page with no option to cancel
  • Attempt to close account

Where normally on an account that owns upgrades you get the prompt to contact support the moment you click on the Close Account option, I made it through the entire flow, including the confirmation step, before getting an error:

Account_Settings_—_WordPress_com

Only after manually removing the premium theme from the account using internal tools, I was able to close the account.

Another in https://en.forums.wordpress.com/topic/closing-account-144/

Of note is they were apparently able to delete the site with the premium theme attached with no problem, but still got an error when trying to close the account.

Looks like the problem is on the API side (that message is shown when the deletion API request fails).

@KokkieH are you able to inspect the API response using the 'Network' tab when attempting to delete with your test user above?

I'm seeing this response:

{"code":403,"headers":[{"name":"Content-Type","value":"application\/json"}],"body":{"error":"active-subscriptions","message":"This user account cannot be closed while it has active subscriptions."}}

Thanks for testing that @KokkieH 👍

It looks like Calypso is applying the right logic, but the API endpoint doesn't know to exclude premium themes from the 'active subscriptions' check.

Noting here as an additional scenario to test for a fix:

I just had a case in https://en.forums.wordpress.com/topic/delete-account-2201 where someone had a premium theme subscription on a site that itself had been successfully deleted three weeks ago. So the site deletion with the active theme subscription worked, but closing the account still doesn't work.

Working on an API fix in D31970-code.

Noting I came across a test account with a non-refundable premium theme I'd forgotten about, and when I tried to close the account it worked without any issues, so it looks like this might be working again. Test account username premtestk

I've just deployed D31970-code in r201400-wpcom. This ignores non-refundable premium themes at the endpoint when the active purchases check is made ✅

Thank you!

Was this page helpful?
0 / 5 - 0 ratings