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 1–12 of 32 results
-
Select options This product has multiple variants. The options may be chosen on the product page
Alder All-Weather Jacket
Price range: $149.00 through $164.00 -
Add to cart
Carhartt WIP Detroit Jacket
$268.00 -
Add to cart
COS Knitted Midi Dress
$175.00 -
Add to cart
COS Oversized Poplin Shirt
$89.00 -
Add to cart
COS Quilted Crossbody Bag
$99.00 -
Add to cart
COS Wide-Leg Trousers
$135.00 -
Select options This product has multiple variants. The options may be chosen on the product page
Cove Merino Crew
Price range: $109.00 through $119.00 -
Add to cart
Everlane Cashmere Crew
$168.00 -
Add to cart
Everlane Linen Camp Shirt
$88.00 -
Sale
Add to cart
Everlane Silk Slip Dress
Original price was: $198.00.$148.00Current price is: $148.00. -
Add to cart
Everlane The Day Market Tote
$165.00 -
Select options This product has multiple variants. The options may be chosen on the product page
Field Twill Shirt
Price range: $89.00 through $104.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.