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 13–24 of 32 results
-
Select options This product has multiple variants. The options may be chosen on the product page
Harbor Oxford Shirt
Price range: $79.00 through $94.00 - Add to cart
-
Select options This product has multiple variants. The options may be chosen on the product page
Linen Column Dress
Price range: $139.00 through $149.00 -
Select options This product has multiple variants. The options may be chosen on the product page
Meadow Wrap Dress
Price range: $129.00 through $139.00 -
Add to cart
Muji Linen Blend Dress
$69.00 -
Add to cart
Muji Yak Wool Cardigan
$89.00 -
Select options This product has multiple variants. The options may be chosen on the product page
Orchard Cable Knit
Price range: $119.00 through $129.00 -
Add to cart
Patagonia Better Sweater Fleece
$139.00 -
Add to cart
Patagonia Black Hole Duffel 40L
$159.00 -
Add to cart
Patagonia Nano Puff Jacket
$239.00 -
Add to cart
Patagonia Quandary Pants
$99.00 -
Sale
Add to cart
Polo Ralph Lauren Oxford Shirt
Original price was: $125.00.$99.00Current price is: $99.00.
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.