Automattic / wp-calypso

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

Purchases: Cannot upgrade from Monthly to Annual payment plan #48894

Open joelwills opened 3 years ago

joelwills commented 3 years ago

Steps to reproduce the behavior

The site should have a Premium Monthly Plan already.

Steps to reproduce the behavior:

  1. Go to 'Manage Purchases' https://wordpress.com/me/purchases
  2. Click on the Premium monthly site you have
  3. Click Renew now
  4. In the cart, on the right hand side under the list of features, click Switch to annual plan
  5. Get error:

Screenshot

Link to image: http://joelwills.com/YvnapR

What I expected to happen

Plan is switched in cart to annual plan

What actually happened

Error above is produced

Context

Browser / OS version

Is this specific to the applied theme? Which one?

Does this happen on simple or atomic sites or both?

Tested on Simple

Is there any console output or error text?

"You have no items in your cart" and "Sorry, this user account does not own the product you are trying to renew."

Console error (possibly unrelated):

Block validation: Block validation failed for `%s` (%o).

Content generated by `save` function:

%s

Level of impact (Does it block purchases? Does it affect more than just one site?)

Yes, blocks upgraded from monthly to annual. Affects at least all simple sites on Premium

Screenshot / Video: If applicable, add screenshots to help explain your problem.

See above

dcoleonline commented 3 years ago

I found a workaround but this also came up in 3680391-zen

It isn't currently possible to upgrade from the monthly subscription of a plan to the annual subscription of that same plan.

So upgrading from monthly Personal to annual Personal fails, but going from monthly Personal to annual Premium/Business/eCommerce works.

The workaround is to visit the annual plan's URL directly. This adds the annual plan to the cart and allows for upgrading from the monthly subscription to the annual subscription of the same plan level.

Plan URLs: https://wordpress.com/checkout/example.com/personal https://wordpress.com/checkout/example.com/premium https://wordpress.com/checkout/example.com/business https://wordpress.com/checkout/example.com/ecommerce

metabreakr commented 3 years ago

To add to @dcoleonline workaround, if you need to upgrade to biyearly, this structure should work as well: https://wordpress.com/checkout/example.com/business-2-years

dcoleonline commented 3 years ago

Thanks @jonnyruzek! I'd missed those.

I'll add all of the 2 year plan URLs here for easy copy/paste.

2 Year Plan URLs https://wordpress.com/checkout/example.com/personal-2-years https://wordpress.com/checkout/example.com/premium-2-years https://wordpress.com/checkout/example.com/business-2-years https://wordpress.com/checkout/example.com/ecommerce-2-years

michaeldcain commented 3 years ago

@sirbrillig: was there code in old Checkout to deal with this sort of issue? Essentially replacing the renewal cart item with a new purchase cart item if the plan term changes?

DavidRothstein commented 3 years ago

I noticed that if you already have the monthly renewal in your cart and then go to https://wordpress.com/checkout/example.com/premium it will replace the monthly renewal with the new annual product (i.e. it does correctly switch things from a renewal to an upgrade). But just making the "Switch to annual plan" link point to that URL would probably not be a great experience if there are other renewals in the cart also (I assume they would all disappear)?

It looks like the intention was never to show the "Switch to annual plan" link for renewals in the first place (https://github.com/Automattic/wp-calypso/pull/46466/commits/29d0b4c5544e35cb1f7d73a7c3a275e88153333e) -- but maybe that code got lost somewhere. The quickest fix is probably to go back to hiding it for renewals, until the feature actually exists? cc @Automattic/martech

michaeldcain commented 3 years ago

@paulbonahora: is this something that y'all would want to prioritize? Specifically the bug from David's comment

mrfoxtalbot commented 3 years ago

I just had a real case of a user wanting to upgrade, to take advantage of the reduced price in 3723576-zen

mrfoxtalbot commented 3 years ago

I did a test on different sites, using different plans and there does not seem to be a way to upgrade. We could add this option on the checkout "edit" step. Screen Shot on 2021-02-09 at 02:32:46

thehenrybyrd commented 3 years ago

Ran into this in #27616621-hc, worked around it via SA.

paulbonahora commented 3 years ago

@michaeldcain, this is something we'd like to prioritize to fix sometime this month. Could you advice if this is something that'd be rather tackled by Payments or if we'd require help from MarTech?

poojashetty18 commented 3 years ago

Another report #3726088-zen, used the direct link as a workaround

paulbonahora commented 3 years ago

@taggon tagging you in case you'd be a better fit to address this issue since you're more familiar with the code. Would you be able to take on this?

michaeldcain commented 3 years ago

Removing the link in #50066.

michaeldcain commented 3 years ago

Removing the [Pri] High label, since the regression is fixed.

metabreakr commented 3 years ago

4131442-zen

happychait commented 1 year ago

39972257-hc

Gave the checkout link as a workaround.

github-actions[bot] commented 1 year ago

Support References

This comment is automatically generated. Please do not edit it.