$query = array(
'post_type' => 'product',
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => '_stock_status',
'value' => 'instock'
),
array(
'key' => '_backorders',
'value' => 'no'
),
)
);
$wp_query = & new WP_Query($query);
while ($wp_query->have_posts()) : $wp_query->the_post();