Discount Deal
  • Discount Deal
  • Amazon
  • Flipkart
  • Myntra

W3TC WooCommerce Taxonomy Purge – Fix W3 Total Cache Category Pages

DiscountDeal
↓ Download Free

Free WordPress Plugin

Fix W3 Total Cache’s Missing WooCommerce Category Purge

W3 Total Cache silently fails to purge WooCommerce product category and tag pages when products are updated. This plugin fixes that — automatically, with zero configuration.

↓ Download from WordPress.org
See how it works
✓ Free & open source
✓ No settings needed
✓ Works with Redis, Memcached & Disk
✓ WooCommerce 5.0+

The Problem

Your WooCommerce Category Pages Are Serving Stale Cache

W3 Total Cache has a setting called “Post terms pages” under its purge policy. It sounds like it should flush your WooCommerce category pages when products change. It doesn’t.

The setting only works for standard WordPress taxonomies — not WooCommerce taxonomies like product_cat, product_tag, or any custom product taxonomies you’ve registered.

Real-world impact: Shoppers see outdated product counts on category pages. New products don’t appear. Out-of-stock items keep showing. Sale prices don’t reflect. All because W3TC’s built-in purge simply misses WooCommerce taxonomy pages entirely.

This is a well-known gap in W3 Total Cache that has never been officially fixed. We ran into it ourselves on our own WooCommerce store at discountdeal.in and built this plugin to solve it properly.


Comparison

What Gets Purged — With vs. Without This Plugin

Event / Page TypeW3TC Alone+ This Plugin
Standard WordPress taxonomy pages✓✓
WooCommerce product_cat pages✗✓
WooCommerce product_tag pages✗✓
Custom product taxonomies (brands, etc.)✗✓
Paginated category pages (page/2/, page/3/)✗✓
Parent category pages (product count changes)✗✓
Purge on bulk edit / quick edit✗✓
Purge on stock change✗✓
Purge on REST API / WooCommerce import✗✓
Works with Redis & Memcached backendsPartial✓

Features

Everything It Handles — Automatically

🗂️

All WooCommerce Taxonomies

Purges product_cat, product_tag, product_shipping_class, and any custom product taxonomy registered on your site — including third-party ones like brands or attributes.

⚡

Hooks Into W3TC’s Pipeline

Uses W3TC’s own w3tc_flush_url() API — so it works with whatever cache backend you’ve configured: disk, Redis, Memcached, or APC.

📦

Bulk & REST API Support

Covers bulk edits, quick edits, WooCommerce imports, and REST API product updates — all the operations that bypass the standard WordPress save flow.

📄

Paginated Pages

Flushes /page/2/, /page/3/, and so on — automatically calculated from your product count and WooCommerce catalog settings. Capped at 5 pages to protect server performance.

🌿

Recursive Parent Purge

When a product is updated, its parent categories are also purged — because their product counts change too. Works all the way up the category tree.

🔒

Safe & Efficient

A built-in deduplication tracker ensures each term is only flushed once per request. A recursion depth cap prevents any risk from corrupted database term hierarchies.


How It Works

The Technical Fix, Explained Simply

The root cause is that W3TC’s purge engine looks at WordPress’s native taxonomy system when deciding what to flush — and WooCommerce registers its taxonomies in a way that W3TC’s built-in logic doesn’t pick up. This plugin bridges that gap:

1

Hooks into W3TC’s w3tc_flush_post action

When W3TC begins flushing a product post, this plugin intercepts the action and identifies which WooCommerce taxonomy terms are attached to that product.

2

Calls w3tc_flush_url() for each term archive

For every product category, tag, or custom taxonomy term — including all paginated pages — the plugin calls W3TC’s official flush API, which works with all cache backends.

3

Handles WooCommerce-specific events separately

Stock changes, bulk edits, REST API updates, and direct term edits all fire additional hooks that also trigger the purge — so nothing slips through.

4

Walks up the parent category tree

After flushing a term, the plugin recursively flushes its parent terms too — because a product update changes counts all the way up the hierarchy.

// Core logic — hooks into W3TC's own flush pipeline
add_action( 'w3tc_flush_post', function( $post_id ) {
    if ( get_post_type( $post_id ) === 'product' ) {
        // Get all WooCommerce taxonomy terms for this product
        $terms = get_the_terms( $post_id, 'product_cat' );
        foreach ( $terms as $term ) {
            w3tc_flush_url( get_term_link( $term ) );
        }
    }
} );


Installation

Up and Running in 60 Seconds

Both W3 Total Cache and WooCommerce must be installed and active before installing this plugin.

  1. Go to Plugins → Add New in your WordPress dashboard and search for W3TC WooCommerce Taxonomy Purge
  2. Click Install Now, then Activate
  3. Done — there is no settings page. The plugin activates silently and begins purging WooCommerce taxonomy pages immediately

Alternatively, download the zip from WordPress.org and upload via Plugins → Add New → Upload Plugin.


FAQ

Frequently Asked Questions

Yes. The plugin uses W3TC’s own w3tc_flush_url() function, which routes through whatever cache backend you have configured — disk enhanced, disk basic, Redis, Memcached, or APC. It doesn’t bypass W3TC’s cache engine at all.

Yes. On init (at priority 999, after all taxonomies are registered), the plugin fetches every taxonomy associated with the product post type and adds it to the purge list automatically. This includes WooCommerce product attributes (pa_color, pa_size, etc.) and any custom taxonomies added by third-party plugins. You can also extend the list manually using the w3tc_woo_purge_taxonomies filter.

No. The plugin only runs during admin-side product save/update events — it has zero impact on front-end page load performance. A built-in deduplication system also ensures that even if multiple hooks fire for the same product in one request, each term URL is only flushed once.

The plugin checks for W3TC on every load and bails immediately if it’s not detected. There are no errors, no notices, and no performance overhead — it simply does nothing until W3TC is active again.

Yes. The plugin hooks into woocommerce_update_product and woocommerce_new_product — these fire regardless of whether the update came from the WordPress editor, the REST API, a WooCommerce import, or a third-party integration.

It is completely free and open source, licensed under GPLv2. There is no Pro version — all features described on this page are included in the free plugin. It was built to solve a real problem and is maintained by the team at Discount Deal.


About

Built From a Real Problem

This plugin was created by the team at Discount Deal — an Indian deals and discount coupons platform covering offers from Amazon, Flipkart, Myntra, and more. We run WooCommerce with W3 Total Cache on our own production store and hit this exact caching bug ourselves.

After spending time debugging why our category pages were showing stale product counts even after updating products, we traced the issue back to W3TC’s taxonomy purge not covering WooCommerce taxonomies at all. We built this plugin as a proper fix, tested it on our live store, and published it on WordPress.org for free so others don’t have to go through the same debugging process.

If you find it useful, feel free to browse our latest deals on Discount Deal — that’s how we keep the lights on.

Stop Serving Stale Category Pages

Free, zero-configuration, and live on WordPress.org. Install it in under a minute.

↓ Download Free from WordPress.org

Discount Deal on WhatsApp

Facebook

Discount Deal on Facebook

Facebook

Discount Deal on Telegram

Telegram

🛍️ Best Amazon & Flipkart Deals, Coupons & Vouchers in India

Welcome to DiscountDeal.in — India's #1 platform for the latest Amazon deals, Flipkart offers, and Myntra coupons. We bring you real-time, verified discount vouchers, promo codes, and cashback offers across all top online shopping platforms — so you always shop smart and save more.

🔶 Amazon Deals & Offers

Get the best Amazon deals today on mobiles, laptops, electronics, home appliances, clothing, grocery, and more. Gear up for the biggest shopping event of the year — the Amazon Great Indian Festival — where you can grab up to 80% off on top brands with exclusive Amazon bank cashback offers, Amazon exchange offers, and Amazon lightning deals. We also track Amazon Prime Day sale, Amazon Freedom Sale, Amazon Summer Sale, and daily Amazon discount codes and Amazon vouchers so you never miss a deal.

🔷 Flipkart Deals & Offers

Discover the latest Flipkart offers, Flipkart coupon codes, and Flipkart vouchers updated every day. The most awaited sale of the year — Flipkart Big Billion Days Sale — brings unbeatable prices on smartphones, TVs, fashion, furniture, and daily essentials. Along with Flipkart Big Billion Day, we cover Flipkart Super Saver Days, Flipkart Sale Today, Flipkart flash sales, and exclusive Flipkart bank discount offers and Flipkart promo codes to help you save the most on every purchase.

🔴 Myntra Deals & Offers

Stay ahead of fashion with the best Myntra deals today, Myntra coupon codes, and Myntra discount vouchers. India's biggest fashion sale — the Myntra End of Reason Sale (EORS) — offers massive discounts on top brands like Nike, Adidas, H&M, Zara, Levi's, Puma, and more. We also track the Myntra Big Fashion Festival, Myntra Black Friday Sale, Myntra New Year Sale, Myntra app offers, Myntra first-order coupons, and Myntra cashback offers — all in one place for men, women, and kids.

💡 Why Choose DiscountDeal.in?

We handpick and verify every deal from Amazon, Flipkart, and Myntra so you don't waste time searching across multiple websites. From Amazon sale today to Flipkart Big Billion Day offers to Myntra EORS discounts — everything is available at one place. No fake coupons, no expired deals — just real savings every single day.

Popular shopping categories: Mobiles, Laptops, Smart TVs, Headphones, Clothing, Kurtas, Jeans, Sneakers, Sarees, Watches, Handbags, Beauty & Skincare, Hair Care, Kitchen Appliances, Baby Products, Gym Wear, Sunglasses, Perfumes, Grocery, and much more.

📌 Bookmark DiscountDeal.in today and save big every day on Amazon offers, Flipkart deals, Myntra sale offers, and exclusive online shopping vouchers & coupon codes in India!

© 2026 Discount Deal • Contact Us • Terms and Conditions • Privacy Policy