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

Free Trials: Refactor the invalidation of site data after purchase #2274

Closed
Tug opened this issue Jan 11, 2016 · 2 comments
Closed

Free Trials: Refactor the invalidation of site data after purchase #2274

Tug opened this issue Jan 11, 2016 · 2 comments
Assignees
Labels
[Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Comments

@Tug
Copy link
Contributor

Tug commented Jan 11, 2016

The problem was raised here https://github.com/Automattic/wp-calypso/pull/2238/files#r49343214

I think it would make sense to me that the code responsible for making the payment request would itself trigger the invalidation (not necessarily handle it but notify of a possible modification in the site data).

For future maintenance, I believe this piece of code would need a refactoring.

A bit of background

When we purchase a plan, we want to update both:

  • The Plans page (at /plans/:site), which loads the Plans or PlanOverview component depending on the type of Plan (free plan or normal plan). This looks at the sitePlans value in the global state store.
  • The name of the plan at the right of the Plans menu entry in the sidebar which for now uses the site.plan.product_name info from lib/sites-list.

And we want to avoid displaying stale data in both case.

A first fix was proposed at #1987 but then it was decided to redirect the user to a custom page after purchasing a free trial plan.

@Tug Tug self-assigned this Jan 11, 2016
@Tug Tug added this to the No-cc Free Trials: v1 milestone Jan 11, 2016
@Tug Tug added [Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. labels Jan 11, 2016
@stephanethomas
Copy link
Contributor

I think we should also refactor the code that was implemented for renewals.

@fabianapsimoes fabianapsimoes modified the milestones: No-cc Free Trials: v1, Free Trials: Future Feb 25, 2016
@fabianapsimoes fabianapsimoes removed [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. [Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. [Status] In Progress labels Feb 25, 2016
@fabianapsimoes fabianapsimoes added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it and removed [Type] Task labels Mar 15, 2016
@fabianapsimoes
Copy link
Contributor

Free Trials are on hold indefinitely while we iterate on our plan offerings. Closing this, since the way trials are offered will have to be reviewed thoroughly once we get back to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

No branches or pull requests

4 participants