-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Hosted Flow: Hide billing term dropdown for Wordcamp new hosted site flow checkout #94680
Hosted Flow: Hide billing term dropdown for Wordcamp new hosted site flow checkout #94680
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~76 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~22 bytes added 📈 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
@@ -310,6 +310,9 @@ function LineItemWrapper( { | |||
if ( has100YearPlanProduct ) { | |||
return false; | |||
} | |||
if ( isNewHostedSiteCreationFlow( signupFlowName ) && product.extra?.hideProductVariants ) { | |||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note:
Hides the plan term selector dropdown in checkout
@@ -116,6 +116,10 @@ export function CheckoutSidebarPlanUpsell() { | |||
return null; | |||
} | |||
|
|||
if ( plan.extra?.hideProductVariants ) { | |||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note:
Hides the plan variant upsell in the checkout sidebar
@@ -645,6 +645,7 @@ export interface ResponseCartProductExtra { | |||
is_marketplace_product?: boolean; | |||
product_slug?: string; | |||
product_type?: 'marketplace_plugin' | 'marketplace_theme' | 'saas_plugin'; | |||
hideProductVariants?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its name is pretty self explanatory, but would you mind adding a short comment block above this property? I'm trying to eventually get a description for everything here in preparation for eventually validating them all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for chiming in @sirbrillig! Happy to take care of this when I'm back from lunch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments in cb92b12. I'm merging this PR early because of a hard deadline on the 20th and requests from marketing to test this live asap.
With that being said, I'm happy to make any updates if you have any feedback on the inline comment 🙂
@@ -69,6 +72,11 @@ const hosting: Flow = { | |||
|
|||
setPlanCartItem( { | |||
product_slug: productSlug, | |||
extra: { | |||
...( queryParams?.utm_source && { | |||
hideProductVariants: queryParams.utm_source === 'wordcamp', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note:
We'll probably to make this "wordcamp" utm_source a constant somewhere @aneeshd16. Unsure where yet. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering this is a temporary change, I think we should be okay with this. We can revert this change once the promo is over.
TestingRequirements
Browsers
|
Related to pau2Xa-6lo-p2#comment-16139
Proposed Changes
hideProductVariants
property toResponseCart
extra metadataNote:
I considered using query params to hide the term selector dropdown and the multi-year plan upsell. I opted not to because it would allow end users to modify their url to make the UI elements visible.
Why are these changes being made?
Testing Instructions
Before
After
/setup/new-hosted-site/plans?utm_source=wordcamp&utm_medium=automattic_referred
/setup/new-hosted-site/plans
without the wordcamp utm source/start
signup flow to verify that the billing term dropdown is still shown in checkoutPre-merge Checklist