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
Add an action to link sessions to customer ids. #45146
Conversation
See #44852. I'm unsure if the `@since` should be populated now, or if that happens when something merges -- I left it as `x.x.x` for now. Unsure if this should move above the `::save_data()` invocation so it can fire before the migration happens -- but to have less potential for impacts, I'm adding it after the work is done so folks could have a record of what the id changed from and to.
Test Results SummaryCommit SHA: a041f5c
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
@georgestephanis could you add some testing instructions, including perhaps a code snippet that shows how the hook would be used? |
Hi @coreymckrill, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
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.
Looks good, thank you for the testing instructions and code snippet!
Unsure if this should move above the ::save_data() invocation so it can fire before the migration happens -- but to have less potential for impacts, I'm adding it after the work is done so folks could have a record of what the id changed from and to.
I think this is a good call. This way it's just a notification of something that happened instead of a place where the normal flow could get interrupted somehow.
I'm unsure if the
@since
should be populated now, or if that happens when something merges -- I left it asx.x.x
for now.Unsure if this should move above the
::save_data()
invocation so it can fire before the migration happens -- but to have less potential for impacts, I'm adding it after the work is done so folks could have a record of what the id changed from and to.Submission Review Guidelines:
Changes proposed in this Pull Request:
Fires an action after a customer has logged in, and their guest session id has been deleted with its data migrated to a customer id.
This hook gives extensions the chance to connect the old session id to the customer id, if the key is being used externally.
Closes #44852
Testing
See #45146 (comment).