WooCommerce Product Variation Filter for Size

A WooCommerce product variation filter narrows results to products with a matching child variation. In this fashion demo, shoppers can pick Size M to find products with an available M option. The global Hide out of stock items setting skips sold-out variations.

Try this: Pick Size M; sold-out products and M variations do not match, so the count is lower than the plain attribute demo.

How this demo is configured

  • Create a filter by Size (product attribute pa_size). Show as Checkboxes. Match values from product variations, not the parent's attribute list. Sort terms by Term ID (ascending).
  • Out-of-stock products and variations: hidden.
Filters
Size
Size

Showing 13–24 of 32 results

How the variation-aware size filter works

The Size filter has use_variations enabled, so the plugin checks child variation attributes for Size M. The demo also enables Hide out of stock items, which skips sold-out variations. A product appears when an available M variation matches.

When variation matching matters

Use variation-aware matching when shoppers choose sizes or attributes stored on child variations. It suits a catalog where each option represents a distinct, purchasable variation.

Configure the variation filter and stock rule

  1. Create a product Filter Set with a taxonomy filter for the attribute used by variations, such as Size.
  2. Under Advanced (optional), enable Use for variations (products only) for that filter.
  3. In Matlock's WP Search & Filter Everything → Settings, enable Hide out of stock items if unavailable products should be omitted.
  4. Confirm WooCommerce marks the chosen attribute as used for variations, and check that each variation has its own correct attribute value and stock status.
  5. Test Size M against the ordinary product attribute demo to see the difference in variation matching.

Frequently asked questions

Can simple products match this filter?

Yes. Products without variations follow the ordinary product taxonomy path.

Which item appears in catalog results?

The filter returns the parent product when one of its variations matches.