Filtering variable WooCommerce products by stock level using meta_query

you are not showing $quantity, maybe that is off? this one here definitely works: $args = [ ‘post_type’ => ‘product_variation’, ‘posts_per_page’ => 100, ‘meta_query’ => [ [ ‘key’ => ‘_stock’, ‘value’ => 0, ‘compare’ => ‘>’, ‘type’ => ‘NUMERIC’ ] ] ]; $query = new WP_Query($args); with this query, you get all variations, that are … Read more

Tried to create a user role that can only edit user information, but my test account cannot view the dashboard. What am I missing?

I cracked it! I went ahead and duplicated an existing role, and trimmed off all of the guff I didn’t think my sales role would need. In the end, I ended up with; assign_product_terms assign_shop_coupon_terms assign_shop_order_terms assign_shop_webhook_terms connections_view_public delete_others_products delete_others_shop_coupons delete_others_shop_orders delete_others_shop_webhooks delete_private_products delete_private_shop_coupons delete_private_shop_orders delete_private_shop_webhooks delete_product delete_product_terms delete_products delete_published_products delete_published_shop_coupons delete_published_shop_orders delete_published_shop_webhooks delete_shop_coupon delete_shop_coupon_terms … Read more