Automattic / Automattic/wp-calypso
Billing: Cancelling plans is quite slow
- Dominant language
- TypeScript
- Stars
- 12.6k
- Forks
- 2k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 552
Description
#### Steps to reproduce
See 3232-gh-jpop-issues
#### What I expected
The cancellation of a plan to take much less time.
#### What happened instead
Plan cancellation takes enough time that it seems to have failed.
#### Browser / OS version
N/A
#### Screenshot / Video
See 3232-gh-jpop-issues
#### Context / Source
This issue was reported by @annezazu quite some time ago. From my debugging it appears that the issue is that the endpoint returns a list of all of the user's purchases after cancelling a purchase. For Automatticans that test, or users with many sites, this going to be a slow process.
In my opinion, the fix here is to stop returning the list of purchases after cancelling a single purchase and to then update clients to delete the single purchase after a successful API call.
Contributor guide
Research direction
Start by tracing the plan-cancellation API endpoint and the client code that handles its response. Confirm the endpoint no longer returns the full purchase list and that clients remove the cancelled purchase after a successful API call; verify cancellation no longer appears to stall for users with many sites or purchases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100