Product Object Caching Enabled by Default for New Stores in WooCommerce 11.0

WooCommerce 11.0 enables product object caching by default for new store installations. Existing stores are not affected and will continue to run with their current configuration.

Product object caching reduces duplicate product loads

The feature was introduced as experimental in WooCommerce 10.5. It intercepts wc_get_product() calls and serves product objects from a request-scoped in-memory cache:

  • The cache is non-persistent — it is cleared between requests.
  • Repeated calls for the same product ID within a request return cloned instances, not references, so callers cannot share mutable state by accident.
  • No manual cache management is required.

Performance numbers from the original announcement still hold — both are speed improvements. Variable products load roughly 9–12% faster on product pages, and bundle products process 6–12% faster during checkout.

Compatibility defaults changed in WooCommerce 10.6

The feature’s default plugin compatibility declaration was changed from INCOMPATIBLE to COMPATIBLE.

No compatibility issues were identified across the extension ecosystem during the experimental period, so extensions without an explicit declaration are now treated as compatible by default. Extensions that explicitly declare themselves incompatible with product_instance_caching continue to surface the standard incompatibility notice in the Features screen.

New WooCommerce 11.0 stores get the feature automatically

For stores installed fresh on WooCommerce 11.0 or later, product object caching is enabled automatically as part of the installation process.

The feature registration itself retains enabled_by_default => false — the enablement is written explicitly during a new install, not inferred from a flag change. This follows the same pattern used for HPOS and other features that graduate from opt-in to new-install default.

Existing stores that upgrade to 11.0 are not touched. If the feature was previously disabled (the default for stores installed before 11.0), it remains disabled after the upgrade. If it was previously enabled, it remains enabled.

Existing stores keep their current setting

ScenarioWhat happensAction needed
Fresh install on 11.0+Feature enabled automaticallyNone
Existing store, feature was offRemains off after upgradeEnable manually if desired
Existing store, feature was onRemains on after upgradeNone

To manually enable or disable the feature on an existing store, go to WooCommerce → Settings → Advanced → Features and toggle Cache Product Objects.

Extensions using standard WooCommerce APIs do not need changes

The compatibility guidance from the original announcement applies.

Extensions that perform direct SQL queries against product data without going through standard WordPress meta hooks may produce stale results if those queries bypass the hooks that trigger cache invalidation. Extensions that retrieve products exclusively through wc_get_product() and standard WooCommerce APIs are not affected.

What’s Next

This is not the final step. Once adoption across stores reaches a sufficient level, the feature will be enabled for all stores — including existing ones. No timeline is set yet; the decision will be based on adoption data.

If you encounter unexpected behavior, please open an issue in the WooCommerce GitHub repository.


2 responses to “Product Object Caching Enabled by Default for New Stores in WooCommerce 11.0”

  1. Deb Sawyers Avatar
    Deb Sawyers

    for most of my stores, this seems like a great feature. I have one store that uses the Ignitewoo Precious Metals plugin that changes the product pricing based on metal price fluctuations. this is definitely not a feature I’d want turned on without a lot of testing to make sure that the price isn’t caching and I would definitely want to be able to opt-out completely even if it’s widely adopted quickly.

    1. vladimirreznichenko Avatar
      vladimirreznichenko

      Thanks for raising this.

      The cache is request-scoped and non-persistent — it is cleared between requests; hence, prices are fetched from the database on each page load.

      Specifically, three pricing patterns work correctly with the cache:
      – Filter-based pricing (woocommerce_product_get_price and related hooks): fires on every price read regardless of caching.
      – WordPress meta API (update_post_meta() / add_post_meta() / delete_post_meta()): each call fires a meta action hook the cache listens to. The cached entry is dropped, and the next wc_get_product() call fetches from the database.
      – Product object setters + save ($product->set_regular_price() / $product->save() etc.): save() routes through the WooCommerce data store, which writes meta via the same functions above and calls clean_post_cache(). The cache is invalidated during the save.

      To check a specific plugin for compatibility, use this prompt with any AI assistant:

      Review the source code of [plugin name] and determine whether it is compatible with WooCommerce product object caching. The following patterns are safe: (1) modifying prices via woocommerce_product_get_price, woocommerce_product_get_regular_price, or woocommerce_product_get_sale_price filters — these fire on every price read and are cache-transparent; (2) writing price meta via update_post_meta(), add_post_meta(), or delete_post_meta() — WordPress fires action hooks after each call that invalidate the cache automatically; (3) updating prices through WooCommerce product setters ($product->set_regular_price(), $product->set_sale_price()) followed by $product->save() — the save path triggers the same meta hooks and also calls clean_post_cache(). Flag any code that writes _price, _regular_price, or _sale_price directly to the database via $wpdb->update(), $wpdb->query(), or similar raw SQL — bypassing all three patterns above — without a subsequent clean_post_cache() or wp_cache_delete() call. This bypasses cache invalidation and may produce stale prices if wc_get_product() is called later in the same request.

      When the universal rollout happens, the feature UI toggle is normally removed; we could add a developer filter to opt out. Please file an issue in https://github.com/woocommerce/woocommerce/issues to get that on the roadmap.

Leave a Reply

Your email address will not be published. Required fields are marked *