Strange cookie/session expiration
-
From WooCommerce 6.5.1 and 6.6.0, I think something has happened to the session handler. When I’m rolling back to 6.5.0, it works better but something still is weird; it takes a little bit longer before the problem occur. It is described like this:
* Put a product in the cart.
* Go to the cart review page. For 6.5.1 and 6.6.0, the session seem to expire instantly and the cart goes empty. Going directly to the checkout page has the same result but depending in the gateway I get noted about the expired session too.For 6.5.0, this is slightly better and it takes up to a minute before the session gets invalidated. I’ve tracked the issue down to class-wc-session-handler.php at this control where the session/cookie goes invalid (so for this case I’m trying to shop as a guest):
// If user has logged out, session cookie is invalid. if ( ! is_user_logged_in() && ! $this->is_customer_guest( $this->_customer_id ) ) { return false; }
I however currently don’t know why this happens, except for if I roll back the woocommerce furthermore, the problem vanishes entirely. I run a test platform with WP 6.0, and when I disable all the plugins except WooCommerce, it also seem to work better. But with no plugins enable, the purpose with WooCommerece also slightly changing ??
Do you have any advice of how I can test for more errors and eventually make the user session not go invalid?
- The topic ‘Strange cookie/session expiration’ is closed to new replies.