Hide WooCommerce out of stock product attribute items
-
I’ve created an attribute for WooCommerce products: size, it has three items, size1, size2 and size3. I can use
get_terms('pa_size', 'orderby=name&hide_empty=1');
to get size attribute items. Now size3 is out of stock but get_terms function returns it. How can I get only items that are in stock(only size1 and size2)?
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Hide WooCommerce out of stock product attribute items’ is closed to new replies.