LiteSpeed Cache and WooCommerce work together quite well right out of the box in most cases, however, there are some situations where the shopping cart is not updated correctly.
This article will show you how to do a configuration tweak that will fix any incompatibility between LiteSpeed Cache and some WooCommerce themes.
How to Fix LiteSpeed Cache + WooCommerce Conflicts
Once logged into your WordPress admin panel, please go to LiteSpeed Cache > Settings > Excludes.
Under Do Not Cache Cookies, please add:
woocommerce_items_in_cart
Scroll down and press Save Changes.
Tired of slow WordPress hosting? We use LiteSpeed + QUIC.cloud Enterprise CDN to deliver content almost instantly. ⚡ Try our Managed WordPress Hosting plans for just $1!
Now please clear your web browser cache and check on your site again. You should now see that your site’s pages are being cached, and the cart is properly updated.
The WooComerce themes with Ajax carts work fine without any adjustment. Adding the cookie to the Do Not Cache Cookies list should be considered a last resort. Any time you tell LiteSpeed not to cache a cookie, any page visited while the cookie is detected will not be cached.
If you enjoyed this tutorial, then you’ll love our support. All ChemiCloud’s hosting plans include 24/7 support from our amazing support team.
Hi, Will this help the loading time of /?wc-ajax=get_refreshed_fragments and /wp-admin/admin-ajax.php ?