I have this code, it shows the best sales, but it also shows the product without stock, how do I modify the code. so that it only shows the products with stock? . Thanks !
$best_sellers_args = array(
'post_type' => 'product',
'meta_key' => 'total_sales',
'posts_per_page' => 6,
'orderby' =>'meta_value_num',
'order' => 'DESC'
);
$products = new WP_Query( $best_sellers_args );