Jul 29, 2025

YITH Quote Counter Stuck? How We Solved a WP Engine Caching Nightmare

Explore more from: Case Study

The YITH quote counter on Process Industrial Supply had stopped moving for guest visitors. They run a WooCommerce catalogue of more than 75,000 products on WP Engine, taking custom orders through YITH’s Request a Quote plugin, and we handle their development white-labelled for SEODogs. Because WP Engine caches aggressively and excludes only a short list of WooCommerce URLs from that cache, guest visitors were served a quote counter that never moved, while logged-in users saw the correct number. Rather than fork the plugin or weaken caching across the site, we added a real-time counter that fetches the count through admin-ajax.php on page load, so the number is right whether or not the page came from cache. The complication was that YITH registers its own AJAX endpoints and handles sessions through its own cookies, so WP Engine had no way to recognise those requests as dynamic. We added explicit cache exclusions for the quote page and for admin-ajax. The counter now updates accurately for every visitor, with no changes to plugin core and no measurable cost to page speed.

What WP Engine Excludes by Default

WP Engine is built for speed, and its cache is deliberately aggressive. Out of the box it excludes only these WooCommerce paths:

^/cart
^/checkout
^/my-account
^/wc-api
^/addons
^/(.*)\?wc-ajax=.*

Those rules cover WooCommerce’s own AJAX cart and checkout perfectly well. The assumption underneath them is that anything dynamic will go through WooCommerce’s standard endpoints.

Why the YITH Quote Counter Slips Through the Cache

YITH does not use those endpoints. It registers custom AJAX actions such as yith_ywraq_add_to_quote and manages its own session state through its own cookies. Nothing about that is broken in isolation, but it sits outside every pattern WP Engine is watching for.

So the host does what it was told to do: it treats the page as static and serves the cached copy, YITH quote counter and all. Logged-in users bypass the cache and see live data, which is why the bug looked intermittent. Guests got a counter and a quote list frozen at whatever the last cached render happened to contain.

The counter was not wrong. It was correct, and several hours old.

Where the Responsibility Sits

WP Engine’s caching is strict, but this is mostly a plugin design problem. Hosts are already tuned for WooCommerce’s standard endpoints, so a quote system built on WooCommerce’s own AJAX framework inherits that compatibility for free. When we built the quote functionality for Taskmaster, we did exactly that, and no cache rules were needed at all.

The Fix: A Real-Time YITH Quote Counter

We needed something accurate and fast that did not involve rebuilding YITH’s core, because any change there would be undone by the next plugin update.

The counter now fetches its value through admin-ajax.php rather than trusting whatever was baked into the cached HTML. Every visitor gets the live count, guest or logged in, regardless of which cached page they landed on. The trade-off is a delay of under four seconds before the number settles, which is a fair price for a figure that is actually correct.

The Cache Exclusions

The Request a Quote page on this site uses the /request-quote slug, so we added two rules to keep the dynamic requests away from the cache:

^/request-quote
^/wp-admin/admin-ajax.php/?$

With those in place the AJAX requests bypass caching entirely, and the quote data stays fresh for guest users without loosening caching anywhere else on the site.

Results

  • The YITH quote counter updates accurately on every page, for guests and logged-in users alike
  • No modifications to YITH plugin core, so updates stay safe
  • Caching remains in place everywhere else, with no measurable impact on performance

The Wider Point

This one sits in the gap between plugin authors and hosting environments. YITH’s custom structure is not cache-friendly, and no host can reasonably be expected to guess at it. A real-time fetch plus two exclusion rules makes it stable and production-ready today, but the durable fix is on YITH’s side: adopt WooCommerce’s default AJAX mechanisms and the problem stops existing for every customer at once.

The plugin itself is YITH WooCommerce Request a Quote, and the route it bypasses is the WooCommerce Store API. If you are weighing up how much of your checkout is exposed to this kind of gap, our WooCommerce reCAPTCHA plugin scans a store for every route an order can arrive through, and the wholesale distributor website is another WordPress build where caching and dynamic content had to coexist.

Fighting a caching problem on WooCommerce? Request a quote and we will take a look.

Interested in a similar or bespoke solution? Let us know what you need, and we’ll deliver a tailored proposal focused on driving measurable success for your business.