Black Friday

30% off premium pluginsEnds 2 December

Shop the sale
Simple Wishlists

How can we help?

Search the documentation or ask the AI agent anything about the plugin.

The counter or hearts do not update

Simple WishlistsUpdated

If the counter stays at 0, or saved products do not show a filled heart after the page reloads, something is stopping the wishlist from loading the shopper’s saved items. This is almost always a caching, CDN or script optimisation setting.

How the counter is filled in

The counter and hearts are the same on every cached page. After the page loads, the wishlist script sends one request to /?wc-ajax=swlp_state to get the shopper’s saved items. It only sends this request for logged-in shoppers, or when the swlp_has_items cookie is set.

Things to check

  1. wc-ajax requests are cached or blocked. Make sure your caching plugin, CDN or firewall does not cache or block URLs with wc-ajax=swlp_ in them.
  2. Cookies are stripped. Some CDNs remove cookies from cached pages. The swlp_has_items and swlp_guest cookies must reach the browser after a save, and be sent with wc-ajax requests.
  3. JavaScript is delayed. If an optimisation plugin delays scripts until the visitor scrolls or clicks, the hearts fill in late. Exclude the wishlist’s frontend.js file from the delay.
  4. JavaScript errors. An error from another plugin can stop all scripts. Check the browser console.
  5. Your store runs on another domain. For a headless or multi-domain setup, requests from the other domain are refused by default. A developer can allow them with the swlp_is_cross_site_request filter.

Test it

  1. Open a private browser window and save a product.
  2. Open your browser’s developer tools on the Network tab and reload the page.
  3. Look for the swlp_state request. It should return a response with your saved items. If it is missing or returns an error, the checks above point to the cause.

Related

Was this article helpful?