I've created an attribute for WooCommerce products: size, it has three items, size1, size2 and size3. I can use
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)?