Open jeyip opened 1 day ago
https://calypso.live?image=registry.a8c.com/calypso/app:build-125338&env=jetpack |
https://calypso.live?image=registry.a8c.com/calypso/app:build-125338&env=a8c-for-agencies |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:
Sections (~21 bytes removed 📉 [gzipped])
Async-loaded Components (~17 bytes removed 📉 [gzipped])
Legend
Generated by performance advisor bot at iscalypsofastyet.com.
@chriskmnds looking for a confidence check with these changes. I made updates several weeks ago to pass the coupon
query param from the logged in plans page to checkout https://github.com/Automattic/wp-calypso/pull/95630.
Previously, it wasn't working as expected. pau2Xa-6sB-p2#comment-16318
This PR is meant to continue tidying up surrounding code and make the feature change in https://github.com/Automattic/wp-calypso/pull/95703 cleaner.
tested /plans/:site?coupon=federate25 but can see the discount visible on all plans. is this expected, something off on my end?
Hmmm...definitely odd. Not seeing it on my end but will investigate 😅
Edit:
I'm unsure where the discount originates from. I notice that the one time discount is being applied to all plans in your screenshot and it's for ~9% off. federate25
should only apply 25% to Business and Commerce plans, so it seems unlikely related to the coupon
query param changes.
I suspect this might be some sort of store sandbox strangeness, but can't manage to replicate. Would you mind clearing your browser cache and testing the logged in plans page again?
What I've tried so far to emulate:
/start/onboarding
and logged in /plans
USE_STORE_SANDBOX
This PR modifies the release build for the following Calypso Apps:
For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run install-plugin.sh $pluginSlug remove/with-discount-prop-from-plans-grid
on your sandbox.
Related to https://github.com/Automattic/wp-calypso/issues/95702 and https://github.com/Automattic/wp-calypso/pull/95703 and pau2Xa-6sB-p2#comment-16318
Proposed Changes
Emails rely on the
discount
query param to auto-apply coupons when redirecting to the logged in plans page. The/start
onboarding flow plans page, however, relies on thecoupon
query param for the same purpose. Although behind the scenes we'll continue to support bothcoupon
anddiscount
for the time being on the logged in plans page ( to accommodate legacy outbound marketing emails ), we'll be consolidating to onlycoupon
in the future.Because of this, we replace instances of the term
withDiscount
with the termcoupon
.These changes also simplify the feature we're implementing here. Refactoring this code allows us to pass a
coupon
query param prop intoPlansFeaturesMain
under the namecoupon
which is already being used throughout the component ( instead of needing to usewithDiscount
).Why are these changes being made?
discount
query param. We're only supporting it behind the scenes because of existing email marketing that is using the term. We'll be using the termcoupon
instead, which is already widely implemented throughout/start
onboardingTesting Instructions
This is a refactoring PR. There should be no functional changes.
/start
onboarding and purchasing a plan with said coupon ( Ex. /start/plans?coupon=federate25 )?discount
and?coupon
query paramsPre-merge Checklist