The rule

A hoodie matches Red + In stock when at least one of its variations is red and in stock. Two different variations, one red and one in stock, do not add up to a match. The tool below applies both rules to the same four products, so you can see where they part.

Does your filter count the parent?

Change which variation is sold out and see the two ways of counting side by side. Nothing you type leaves this page.

How the address looks

The filtered page is an ordinary WooCommerce address: filter_color=red for the attribute, query_type_color=or or and for how several values combine, and filter_stock_status=instock for stock. WooCommerce applies them to the shop’s query itself. Siftwren adds the rule that makes the stock part variation-aware.

A useful consequence is that addresses in WooCommerce’s spelling work in a Siftwren set, and the other way round. We built 26 addresses from the parameters WooCommerce’s own filter blocks write, and compared the products returned with and without Siftwren active: the same products came back in every case, except the one where the hoodie’s sold-out red is the whole point.

Setting it up

Add one filter for the attribute and one for Stock status to a set. Choose checkboxes for both. For colours, any of them is the usual choice. If a shopper might want a jumper that comes in both red and blue, choose all of them instead, and the count for each value will follow.