Cloudflare Cache resulting in incorrect stock status woocommerce

Hi There,

We use cloudflare on the Pro Plan with our WooCommerce site.

We use the official cloudflare plugin and have APO enabled.

We have tested and found that the cloudflare cache results in incorrect stock status on our site, and currently have to manually purge the cache every couple of days to ensure it is correct.

All of the guides, and information online says that enabling APO should setup the correct bypass for dynamic items such as stock level and status.

Note this worked for about a year and has been an issue for last couple of months.

Any help is greatly appreciated!

Regards, Travis


Is that a backend information, available to admins only? Or do you mean information of the frontend? Can you share the domain name?

1 Like

I mean the product information that the customer sees on the front end. Both in the varrious grids and individual product pages. eg I restocked these but it still says “out of stock” (but if im logged into wordpress dashboard it shows correct as it bypasses the cloudflare cache).

You’d need to investigate your installation to check which file is responsible for providing that value (“Out of Stock”) in the chain of requests, then set it to be bypassed with a Cache Rule. Perhaps you could get some help from your theme’s developers.

It can also be that your installation is not signaling the updates in stock with a hook that the Cloudflare plugin detects. In this case, the Woocommerce plugin forum may be a good place to ask for help.