The Subscriptions health check tool and the HPOS cache bug

Data center server racks representing WooCommerce HPOS order storage architecture

WooCommerce shipped a new tool for checking WooCommerce Subscriptions health, and it matters most if you are running High Performance Order Storage (HPOS). The failure mode it targets is the annoying kind: a customer emails to say their subscription never renewed, you open the logs, and nothing looks wrong. The renewal order simply never fired.

You will find it under WooCommerce > Status > Subscriptions. It exists because of a handful of bugs from the HPOS transition. The one it mainly looks for is a subscription stuck in “manual renewal” mode while a valid payment token sits right there on the account. It also lists active subscriptions with no payment date, and ones whose renewal date has passed without the Action Scheduler doing anything about it.

The HPOS cache problem behind the failed renewals

I assumed the serious HPOS caching problems were behind us. They were not. There was a race condition in save_dates(): on busy stores the OrderCache did not get cleared after subscription dates were updated. Any read later in the same request then got stale data back, and the system wrote the default “manual” state over the “automatic” billing flag.

That is the same sensitivity you run into with WooCommerce product object caching. When the baseline object is stale, your save() call either does nothing or writes bad data. The stale baseline looked roughly like this:

// The "Bad" Path: Stale data persists in the OrderCache
function bbioon_simulate_hpos_bug( $subscription_id ) {
    $sub = wcs_get_subscription( $subscription_id );
    $sub->set_requires_manual_renewal( false );
    $sub->save(); // Bug 1: OrderCache wasn't invalidated here

    // This second call would return the old "manual" state
    $stale_sub = wcs_get_subscription( $subscription_id ); 
    return $stale_sub->get_requires_manual_renewal(); // returns true (stale)
}

Keeping an eye on WooCommerce Subscriptions health

The tool keeps running after the initial cleanup, so it also catches problems that have nothing to do with those two bugs. Results are split across tabs:

  • Supports auto-renewal: subscriptions marked manual even though the customer has a saved payment token on a gateway like Stripe or Square.
  • Missing renewals: active subs with no next payment date, or a date in the past with no matching order.
  • All: everything at once, for when you just want to audit.

The “circuit breaker” is the part I like. When a scheduled scan keeps failing, it backs off rather than burning server time on repeat attempts. On a store with thousands of subscriptions, one long-running query is enough to drag the database down.

What the changelog left out

The fixes landed in WCS 6.1.0 and 6.3.0, filed as HPOS compatibility tweaks. Nothing in those notes said what it meant for a live store: subscriptions flipping to manual at checkout. That is a large part of why the tool exists at all. If you ran Subscriptions with HPOS enabled between October 2023 and May 2024, hit “Run now” and scan.

If this kind of subscription debugging is eating your dev hours, I can take it off your plate. I’ve been working with WordPress since the 4.x days.

Verify your data stores

Even a core-maintained plugin can get cache invalidation wrong when the storage engine changes underneath it. If you are building custom subscription flows, keep the WCS Developer Docs open, and clear transients and object caches yourself during bulk updates instead of trusting that something else will.

author avatar
Ahmad Wael
I'm a WordPress and WooCommerce developer with 15+ years of experience building custom e-commerce solutions and plugins. I specialize in PHP development, following WordPress coding standards to deliver clean, maintainable code. Currently, I'm exploring AI and e-commerce by building multi-agent systems and SaaS products that integrate technologies like Google Gemini API with WordPress platforms, approaching every project with a commitment to performance, security, and exceptional user experience.