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.
Showing 25–32 of 32 results
-
Select options This product has multiple variants. The options may be chosen on the product page
Ridge Insulated Parka
Price range: $189.00 through $204.00 -
Sale
Add to cart
The North Face 1996 Retro Nuptse Jacket
Original price was: $330.00.$279.00Current price is: $279.00. - Add to cart
-
Add to cart
Uniqlo Oxford Shirt
$29.90 -
Add to cart
Uniqlo Rayon Long Dress
$49.90 - Add to cart
-
Sale
Add to cart
Uniqlo Smart Ankle Pants
Original price was: $39.90.$29.90Current price is: $29.90. -
Sale
Add to cart
Uniqlo U Blocktech Parka
Original price was: $79.90.$59.90Current price is: $59.90.
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
- Create a product Filter Set with a taxonomy filter for the attribute used by variations, such as Size.
- Under Advanced (optional), enable Use for variations (products only) for that filter.
- In Matlock's WP Search & Filter Everything → Settings, enable Hide out of stock items if unavailable products should be omitted.
- Confirm WooCommerce marks the chosen attribute as used for variations, and check that each variation has its own correct attribute value and stock status.
- Test Size M against the ordinary product attribute demo to see the difference in variation matching.