Always empty mini-cart solution with HIT LSCache and Swift Performance cache

[ad_1]

For those who are having problems with the mini cart always empty with the cache in “HIT”, below is the solution I found:

As per the Woocommerce explanation, they have removed wc-cart-fragments to increase the performance. If you are using elementor, I believe now it’s up to elementor to get a fix. I saw elementor mentioned on GIT that they would give a fix with the 3.14.0 release. Until that, the below code will fix the issue.

Add this code to the function.php in the child theme or main theme (if you do not use a child theme)

I use the LSCache and Swift Performance plugins.

Source: https://stackoverflow.com/questions/76495561/woocommerce-mini-cart-is-coming-blank-on-add-to-cart-from-product-page

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer