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

Checkout: remove handleCheckoutCompleteRedirect #48501

Merged
merged 4 commits into from
Jan 4, 2021

Conversation

sirbrillig
Copy link
Member

@sirbrillig sirbrillig commented Dec 18, 2020

Changes proposed in this Pull Request

This removes the handleCheckoutCompleteRedirect function from old checkout's Checkout component. The last place it was being used was the (disabled) post-purchase G Suite upsell nudge and that usage has been removed with #48438.

This should help confusion around where the post-purchase thank-you page comes from, since it will now always be generated by getThankYouPageUrl.

Testing instructions

None. Make sure the removed code isn't in use anywhere.

@sirbrillig sirbrillig requested a review from a team as a code owner December 18, 2020 18:40
@matticbot
Copy link
Contributor

@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 18, 2020
@sirbrillig sirbrillig self-assigned this Dec 18, 2020
@sirbrillig sirbrillig added the [Feature] Checkout The checkout screen and process for purchases made on WordPress.com. label Dec 18, 2020
Copy link
Contributor

@pottedmeat pottedmeat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes a number of props from <Checkout> that are still passed by <CheckoutContainer> that could be removed:

  • couponCode
  • returnToBlockEditor
  • returnToHome
  • selectedFeature
  • purchaseId
  • plan
  • reduxStore
  • redirectTo
  • upgradeIntent
  • hideNudge
  • infoMessage

It also looks like there are props used in <Checkout> (and passed by <CheckoutContainer>/<CartData>) but not in propTypes:

  • cart
  • product
  • setHeaderText
  • isFetchingStoredCards

@pottedmeat
Copy link
Contributor

I think it's also worth removing the class export.

@pottedmeat
Copy link
Contributor

Is it worth worrying about any of this stuff? It looks like we might pull out the rest of this code soon.

@sirbrillig
Copy link
Member Author

sirbrillig commented Dec 18, 2020

Good eye. I rebased and I think we've finally got all of the code in this directory, but it's a lot, so I've split it into two PRs. This one will just remove handleCheckoutCompleteRedirect since I'm certain that's not being used and #48512 will handle Checkout and CheckoutContainer.

@pottedmeat
Copy link
Contributor

Cool. There's also some unused stuff in the mapped prop functions in connect.

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@michaeldcain michaeldcain added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 22, 2020
@sirbrillig sirbrillig merged commit 8ecd31c into trunk Jan 4, 2021
@sirbrillig sirbrillig deleted the remove/handle-checkout-complete-redirect branch January 4, 2021 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Estimate] 1 [Feature] Checkout The checkout screen and process for purchases made on WordPress.com.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants