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

Ajax call /?wc-ajax=get_refreshed_fragments clears cart when plugin installed #143

Closed
pristas-peter opened this issue Sep 25, 2019 · 2 comments
Assignees
Labels
bug Something isn't working failing utility Issue concern a failing utility.
Milestone

Comments

@pristas-peter
Copy link

Steps to reproduce the behavior:
I have installed vanilla Woocommerce with Storefront theme and this plugin with wp-graphql.

When I click add to cart the product is added to the cart and page refreshed with correct items in cart. However on page load there is an ajax call /?wc-ajax=get_refreshed_fragments. Response from that cart clears cart_hash cookie and returns 0 products in cart.

This does not happen when plugin is deactivated.

Screenshots
Screenshot 2019-09-25 at 08 12 35

@kidunot89 kidunot89 added the bug Something isn't working label Sep 25, 2019
@kidunot89
Copy link
Member

kidunot89 commented Sep 25, 2019

The is most likely due to the QL_Session_Handler. Sounds like it's preventing the woocommerce session cookie from being updated property. This is definitely a bug, since the QL_Session_Handler shouldn't be used on non-GraphQL request. I'm not too familiar with the wc-ajax action, I'll have to look into it. 🤔

@kidunot89 kidunot89 pinned this issue Sep 25, 2019
@kidunot89 kidunot89 added the failing utility Issue concern a failing utility. label Sep 25, 2019
@kidunot89 kidunot89 added this to the v0.2.2 milestone Sep 28, 2019
@kidunot89 kidunot89 self-assigned this Sep 30, 2019
@kidunot89
Copy link
Member

Fixed in #146. @pristas-peter thanks for catching this one. It would have been a pain down the line.

@kidunot89 kidunot89 unpinned this issue Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working failing utility Issue concern a failing utility.
Projects
None yet
Development

No branches or pull requests

2 participants