-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Guest cart session is not synced with Woocommerce cart session #285
Comments
Hi @kidunot89, I implemented the guide as in #88 with graphql JWT plugin. The cart is persistent in graphql as guest. So I will be able to add item to cart using mutation and get the cart items with query. But when I check the default Woocommerce cart page. The items added with |
This is because they don't share the same session. WooGraphQL uses a custom session handling method. |
I see. Thank you for the explanation. |
@kidunot89 Is there a way to sync the guest cart to the user cart when the user logs in? |
@kidunot89 Im having the exact same issue. I would like to use the default checkout process instead of rebuilding all that logic on the react side. Is there an example or direction on how to sync sessions so the default checkout can be used? I think @jacobarriola has accomplished this, maybe he can chime in? Its probably way more straight forward than I'm thinking... Im just stumped. |
Describe the bug
If you add an item in cart as a guest using mutation, the Woocommerce cart session will remain empty. That means the cart sessions are different for mutation and Woocommerce.
To Reproduce
Steps to reproduce the behavior:
addToCart
mutation as a Guest in browser.Expected behavior
Woocommerce cart page should have the same item added as
addToCart
mutation.Additional context
latest wp-graphql and wp-graphql-woocommerce
The text was updated successfully, but these errors were encountered: