Disable the Persistent Cart
Stops WooCommerce from saving logged-in customers' carts to their account between sessions, so each visit starts with an empty cart.
Opens WPIDE on
Code
add_filter( 'woocommerce_persistent_cart_enabled', '__return_false' );
Notes
Guests are not affected because their carts are stored in a session cookie.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.