0
votes

I have built a custom WooCommerce Theme for a client. On the checkout page the user has the option to - Login to his existing account (empties the cart) - Register a new account (works) - (if logged in) logout and login to another account (empties the cart)

I need to change this behavior and allow the user to login/logout without losing their cart content. I have looked into the WooCommerce Core but couldn't figure out how to achieve this. The session handler class seems to save the cart contents based on the customer_id but I'm not sure if it's possible to change that.

Can you help me fix this problem? Maybe someone has already done this or something similar.

1

1 Answers

0
votes

You did not provide much information, but considering what you said your problem is not woocommerce, would be the fact that you are browsing http at one time and switching to https at another. Set up the entire site to run on https only (google will thank you) and your issue will be fixed.

If your site is browsing https only, validate that by setting "preserve log" at "Network" tab in the "developer tools" on chrome, navigate through the pages you was talking and then adding this information (that you checked and its all https only) to your answer.

cheers!