WooCommerce Mini Cart Not Update – Change the “No products in the cart” message
Today, while I was trying to improve the site speed of one of my clients, I found a cache issue. The site was actually an WooCommerce store and I was also using WP Rocket in the performance optimization process.
The issue was the mini cart button from the header wasn’t updated in the right language. What my client was seeking was to change the “No products in the cart” with a translated version of it in the Romanian language (Niciun produs in cos ).
For the translating task, I used Loco Translate, one of the best plugins from the market. The phrase was translated inside the Loco plugin, but – somehow – it didn’t refreshed in the front page of the store, and the mini cart button phrase wasn’t cleared properly (and updated with the right one).
Here is the “Mini Cart Not Update” troubleshooting checklist:
To avoid any issue, please deactivate the cache plugin (if there is any). After each action, make sure you clear the browser cache, too.
Before this issue appeared:
Have you deleted/installed/update any plugin (maybe a performance/cache plugin, etc.)? Did you modified anything inside the WooCommerce settings? If so, can you revert it?
Solving the Mini Cart Change Text Issue Through the WooCommerce’s Settings:
- Go to Admin Dashboard > WooCommerce > Status > System Status. Is there any red alert? If so, what is the error message?
- Go to WooCommerce > Status > Tools, and clear the following things: “Clear transients”, “Clear expired transients”, “Recount terms”, “Clear all sessions”.
Clear your browser cache and check it again.
- Go to WooCommerce > Settings > Advanced > Checkout Endpoints and make sure there isn’t any blank space between the words. Example: The order pay endpoint should be “order-pay” and NOT “order pay”/”order – pay”/ “order- pay”, and so on.
- Go to WooCommerce > Status > Tools > Scroll down to “Create default WooCommerce pages” and press “Create pages”
With any performance plugin, try to update and optimize the database tables. If you don’t have any performance plugin installed, you can give a try to this one: Go to WordPress plugin directory and search: “WP-Optimize”. After plugin activation, go to dashboard > Optimize Actions > Optimize Database tables > Press Run selected optimization.
Go to Admin Dashboard > Pages:
- First, check the Cart page. In the right side, under the “Page Attributes” > Parent, make sure is set to “(no parent). This page MUST NOT have a parent page.
- Second, check the Checkout page. In the right side, under the “Page Attributes” > Parent, make sure the parent of this page is set to the “Cart” page.
Other WordPress things to check:
- Make sure WordPress CMS, WooCommerce and any other WooCommerce addon are updated. If you think/know the issue appeared after you updated the WooCommerce plugin (or any other addon), install this plugin and revert the action: WP Rollback
- Make sure the site address is well configured. Go to Admin Dashboard > Settings > General, and check if both URLs are corresponding. If one use https://www., the other one must be the same.
- Disable all the other plugins and see if the issue is still there.
Go to Admin Dashboard > Settings > Permalinks > Without doing anything, press “Save”.
Solving the Mini Cart Change Text Issue – WP Rocket
WooCommerce cart is empty after adding products
The first thought was to clean the cache of WP Rocket plugin and also the browser cache, hoping this will solve the cache issue. But nothing… I started to investigate further and I began to disable the plugins. The first plugin I disabled was WP Rocket (knowing that any cache plugin may generate this kind of issues). With the WP Rocket disabled, the WooCommerce mini cart button updated with the right translated phrase. This is a general definition of this WooCommerce & WP Rocket issue:
"Cart issues can be related to WP Rocket's optimization of the get_refreshed_fragments request from WooCommerce."
BEFORE ANYTHING, DO A FULL BACKUP OF YOUR SITE.
The FIX: WooCommerce Refresh Cart Fragments
The solving action for fixing the mini cart cache issue is to remove the transient data. You can do this with the following two plugins:
1. Download this plugin from GitHub: WP Rocket | Deactivate WooCommerce Refresh Cart Fragments Cache , install and activate it. It will solve the issue.
2. If, from any other reasons, the mini cart don’t update, download this plugin: Transients manager plugin
After you activated the plugin, remove the following transient (you will see the entire list there):
rocket_get_refreshed_fragments_cache transient
Solving the Mini Cart Change Text Issue – Perfmatters
If you are using Perfmatters plugin (great choice), make sure you didn’t (accidentally or not) disable the WooCommerce scripts.
- Go to Admin Dashboard > Settings > Perfmatters > Options > “General” Tab: Scroll down until you get to “WooCommerce” and make sure nothing is checked/enabled there.
- On the Script Manager (to access is, insert “?perfmatters” at the final of the URL – Example: websitesseller.com/?perfmatters ) > Scroll down to WooCommerce > Make sure “wc-cart-fragments” is ON.
Clear your browser cache and check it again.
For other cache plugins
If you are using other cache plugins, mainly you have to make sure “wc-cart-fragments” is not blocked/cached.
That’s it. I hope you got rid of the WooCommerce Mini Cart Issue, and everything is solved right now.