Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Rename onCheckoutBeforeProcessing to onCheckoutValidationBeforeProcessing #3984

Closed
nerrad opened this issue Mar 20, 2021 · 0 comments · Fixed by #4039
Closed

Rename onCheckoutBeforeProcessing to onCheckoutValidationBeforeProcessing #3984

nerrad opened this issue Mar 20, 2021 · 0 comments · Fixed by #4039
Assignees
Labels
block: checkout Issues related to the checkout block. category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. type: refactor The issue/PR is related to refactoring.

Comments

@nerrad
Copy link
Contributor

nerrad commented Mar 20, 2021

This idea came up as I considered the problem outlined in #3980 when I realized the onCheckoutBeforeProcessing is tightly coupled to the validation when the checkout has been submitted (as a quick way to alert the user there is something missing/wrong before submitting to the server).

Given its use-case, I suggested that it would make sense to change the name of this event to something like onCheckoutValidationBeforeProcessing to more clearly articulate its purpose and behaviour.

For implementation, we will need to make sure we keep back compat for current implementation of this hook outside of our own code (and throw a deprecation notice for when onCheckoutBeforeProcessing is called instead of the new function. Not sure we'd ever remove the deprecated event (or at least far in the future) but at least we can stop promoting it (in docs) and elsewhere it's outlined.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: checkout Issues related to the checkout block. category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. type: refactor The issue/PR is related to refactoring.
Projects
None yet
2 participants