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

@kidunot89 Is there a way to sync the guest cart to the user cart when the user logs in? #691

Closed
sarkis1997 opened this issue Jan 5, 2023 · 2 comments
Labels
question Further information is requested

Comments

@sarkis1997
Copy link

    @kidunot89 Is there a way to sync the guest cart to the user cart when the user logs in?

Originally posted by @guilhermejbranco in #285 (comment)

Is there already a solution for this?

@kidunot89
Copy link
Member

Using the login mutation while providing the woocommerce-session HTTP header should result in the session being updated. Retrieving the woocommerce-session HTTP header from the resulting response will be the modified session token for the recently logged in user. Be sure to use the response header and not the sessionToken from login mutation output. Using that one will erase the old session.

@kidunot89
Copy link
Member

@sarkis1997 ☝🏿

@kidunot89 kidunot89 added the question Further information is requested label Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants