Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redirect user to
/home
after they cancel DIFM checkout (#95183)
This diff hijacks the 'website-content' step in order to check the value of the `?skippedCheckout=1` query param. If it's set then we go straight to My Home otherwise an error is shown - since the purchase is never completed, the DIFM data isn't set up and that's why there's an error on this page. The checkout page usually supports both `?redirect_to` and `?cancel_to` query params that let you go to a different location if the user cancels the checkout. Unfortunately the signup framework only gives the ability to set a single "destination" for a flow. https://github.com/Automattic/wp-calypso/blob/cf0aa1a007213a6cfcf40b420acd7f4b9c1d8441/client/signup/config/flows-pure.js#L506 For reference, the `?skippedCheckout=1` param is set here: https://github.com/Automattic/wp-calypso/blob/cf0aa1a007213a6cfcf40b420acd7f4b9c1d8441/client/signup/config/flows.js#L58
- Loading branch information