
By Dylan Fetch | September 18, 2025 | Estimated 4 Minute Reading Time
Having trouble with your WooCommerce wishlist? Speculative loading could be the issue.
If you don’t care about why, and just want it fixed, then scroll to the bottom of the article.
My client contacted me because a customer reported that the wishlist on their WooCommerce site was not working. I tested it and confirmed the issue.
- Visited the site as a logged-out user
- Added a product to the wishlist
- Visited the wishlist page
- The product was not present on the wishlist
- Reloaded the page, and the product appeared on the wishlist
So, initially the product did not appear on the wishlist. But, after refreshing the page the product appeared on the wishlist as expected. It sounded like a caching issue, but with page caching turned off, the issue persisted. I had been learning about speculative loading in Wordpress at the time, so I explored that as a possible cause.
What is Speculative Loading in Wordpress?
In WordPress 6.8, speculative loading was added to all sites for logged-out users. But, what is it? In simple terms, speculative loading is a feature that starts loading the next page the user will visit early. How does it know which page the user will visit next? It uses clues. The “aggressiveness” of the speculative loading determines how “strong” the clues must be to start loading the next page. By default, WordPress has set speculative loading to conservative-preload. That means:
- It only uses the strongest clues(clicking on a link)
- It only starts loading resources early, it does not start building the page early
Those settings will give a small boost in navigation speed, without adding too much additional server load, and without causing too many errors. They are also only active for users who are logged-out. It is common for performance improving features to be inactive for logged-in users to reduce the chance of errors.
If you’re a more advanced user, you can read more about speculative loading here: https://make.wordpress.org/core/2025/03/06/speculative-loading-in-6-8/
How Can Speculative Loading Impact a WooCommerce Wishlist?
In this case, the wishlist button was also a link to the wishlist page. So, pressing the button to add the product to the wishlist caused the wishlist page to start loading early. After adding to wishlist, you clicked the same button again to visit the wishlist page. But, the wishlist page already started loading before you added the product.


Here’s a breakdown:
- Clicked “Add to Wishlist”
- Speculative Loading started loading wishlist page in response to link click
- Product added to wishlist
- Clicked “Browse to Wishlist”
- Wishlist page renders without product because it started loading before the product was added to the wishlist
- Reloaded the page and the product appeared
You can confirm this by opening the Chrome developer tools. Navigate to the “Application” tab. Then click “Speculative Loads” in the list on the left side. Click on the link, and you’ll see a green indicator stating whether resources are being speculatively loaded.

How Can You Turn Off Speculative Loading for a Specific Page?
aka How Can I Fix the Wishlist?
I wanted to avoid turning off speculative loading completely. This was an ecommerce website. On a site where logged out users navigate between multiple pages, speculative loading can give a improved user experience. So, the solution was to turn off speculative loading exclusively for the wishlist page. That was accomplished by adding a snippet of code to the functions.php file in the child theme.
// Speculative loading caused an issue where a product would not appear on the wishlist after being added until the wishlist page was reloaded.
// This issue only affected logged out users.
add_filter(
'wp_speculation_rules_href_exclude_paths',
function ( $href_exclude_paths ) {
$href_exclude_paths[] = '/wishlist/*';
return $href_exclude_paths;
}
);
If you paste the code into a parent theme, then the next time you update your theme the code will be removed. That’s why you want to use a child theme for this. It allows adding custom code, without it being overwritten by an update.
If you already have a child theme, then you can navigate to Appearance > Theme File Editor > functions.php. Copy the code above and paste it in. If you don’t have a child theme, then it’s a bit more complicated. You’ll need to first create a child theme. You can learn more about that here.
After adding the snippet, pull up Chrome dev tools again. Visit the same Application > Speculative loads screen. Click the “Add to Wishlist” button, and ensure there are no speculative loads.

Conclusion
If you get complaints that your wishlist isn’t working on your WordPress WooCommerce site, then try disabling speculative loading for that page.
This article may make speculative loading sound problematic, but this is a rare case. Speculative loading was thoroughly tested before being added to WordPress core. It will work for most WordPress users in most cases, but not all. Since it is a new feature, many people don’t know about it, and won’t consider it when debugging an issue.
If you need help, send an email to dylan@fetch.software