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

Checkout: Broken Business plan upsell with free plan #92889

Open chriskmnds opened 1 month ago

chriskmnds commented 1 month ago

When visiting one of the checkout plan upsell URLs, I noticed a couple of suspicious/wrong behaviors:

Steps to reproduce:

Price should be 300, not crossed-out to 0. "Premium" should not be shown/hardcoded in the string.

Image

Clicking on upgrade shows the correct one:

Image

chriskmnds commented 1 month ago

cc @Automattic/shilling to confirm?

chriskmnds commented 1 month ago

I'm guessing these upsells weren't exactly built generically. "Premium" plan is hardcoded in the string and the price renderer assumes there will always be a discount from proration. So they were built as Business-plan upsells for Premium-plan sites - and I'm guessing it's down to the consuming component to direct to the right upsell-type. The fact that I can still visit the Business upsell URL with a free site and get 0 rendering, is a code smell/bug irrespective of intended use.

cc @Automattic/shilling to confirm if this is something that needs addressing?

JessBoctor commented 1 month ago

Thanks for highlighting @chriskmnds ! Are you getting this landing page when you sign up for a Free plan? Or is it just possible to visit the page even if you are on a Free plan? From your instructions, it seems like the latter.

So they were built as Business-plan upsells for Premium-plan sites - and I'm guessing it's down to the consuming component to direct to the right upsell-type.

From the testing I have done, this feels true. I don't think I see this landing page whenever I am completing a purchase for a Free or Personal/Starter plan. It does, however, pop-up whenever I complete a checkout for Premium/Explorer plans.

The fact that I can still visit the Business upsell URL with a free site and get 0 rendering, is a code smell/bug irrespective of intended use.

This is also true. I also notice that the However, I think this is a page that only comes up in certain flows. So without someone knowing they can go to /checkout/[ free site ]/offer-plan-upgrade/business, it shouldn't be available to them. What I mean is, there isn't a link to this page anywhere in Calypso or me/purchases

Also interesting, is that this seems to be an issue with certain currencies. While the hard coded plan names are still incorrect, the pricing is correct when I switch to MXN or INR:

Screenshot 2024-07-23 at 10 41 49

Seems like the default discounts (pbOQVh-4sd-p2) might have something to do with it

cc @Automattic/shilling to confirm if this is something that needs addressing?

It seems like it would be good to fix by correcting the upsell language and pricing. However, this isn't a page we own. Maybe @Automattic/martech-decepticons ?

southp commented 1 month ago

Great finding, @chriskmnds . You are right that it's current implementation is tightly coupled with its only intended usage, i.e. upgrading from Explorer to Creator.

While I'm agreeing that it's better to be generalized, there is no plan for using it outside of the current use cases, so I'd prefer us to deprioritize it for now unless it is a blocker for your current work :)

chriskmnds commented 1 month ago

@JessBoctor Thanks for taking a look and getting back. It does sound like something that MarTech owns. Appreciate you looking irrespective ⭐

@southp It's not a blocker for me, so nothing pressing