Skip to content

Only start session when adding an item to the cart #8813

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

Open
ashleyfae opened this issue Aug 12, 2021 · 3 comments · May be fixed by #8814
Open

Only start session when adding an item to the cart #8813

ashleyfae opened this issue Aug 12, 2021 · 3 comments · May be fixed by #8814

Comments

@ashleyfae
Copy link
Contributor

Enhancement Request

Explain your enhancement (please be detailed)

Right now we start a session all the time. We'd make a lot of people happy if we only started a session when first adding an item to your cart. From there we'd maintain the session until the cart is completely emptied.

Justification or use case

This would allow sites to actually utilize caching --- at least until an item is added to the cart.

@cklosowski
Copy link
Contributor

@ashleyfae Some history on this type of behavior. Just to make sure we don't run into any of the same complications. Previously we ran into a lot of issues related to adding to cart and the sessions completely being out of sync with the main browser thread, and the ajax thread that is made.

#4284

@mihaijoldis
Copy link
Contributor

One customer mentioned the sessions isue here https://secure.helpscout.net/conversation/1880373242/1933976?folderId=5747302 and he suggested that our code should be session_start(['read_and_close' => true]); as to not affect WP core.

@polevaultweb
Copy link
Contributor

+1 I would love to be able to put my EDD powered site behind a page cache. Currently this isn't possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants