'product',
'posts_per_page' => '10',
'offset' => 0,
'order' => 'DESC',
'post_status' => 'publish',
'meta_query' => array(
'relation' => 'OR',
array( // Simple products type
'key' => '_sale_price',
'value' => 0,
'compare' => '>',
'type' => 'numeric'
),
array( // Variable products type
'key' => '_min_variation_sale_price',
'value' => 0,
'compare' => '>',
'type' => 'numeric'
)
)
);
$posts = new WP_Query( $arg ); ?>
have_posts() ) : ?>
have_posts() ) : $posts->the_post(); ?>
?>