admin管理员组

文章数量:1430093

I have a stock filter on WooCommerce shop page. So I need to filter number of products based on the selection from the user for this filter.

I have variable products and I am not able to control stock via meta_query as the stock value is given at variation level. Is there any way to control stock at product level for variable products ?

I am also thinking to use tax_query for this purpose but I think it could not be implemented in this way.

'tax_query' => array(
    'relation' => 'AND',
         array(
         'taxonomy' => 'pa_my_variation',
         'field' => 'max_qty',
         'value' => 33,
         'operator'  => '>='
),
),

I do not have a lot of experience with stuff like this so I will really appreciate your suggestion about this issue. Thank you!

本文标签: woocommerce offtopicTax Query for custom Taxonomy field