I have two woocommerce queries, I want to display on the same page both queries, first the query with image and after the query without image, how do I merge them, so they will not mix?
$argWithImage = array(
'post_type' => 'product',
'posts_per_page' => -1,
'product_cat' => $queried_object->slug,
'meta_key' => '_thumbnail_id',
);
$argWithoutImage = array(
'post_type' => 'product',
'posts_per_page' => -1,
'product_cat' => $queried_object->slug,
'meta_query' => array(
array(
'key' => '_thumbnail_id',
'value' => '?',
'compare' => 'NOT EXISTS'
)
),
);
$merged_query_args = array_merge( $argWithImage, $argWithoutImage );
$query = new WP_Query( $merged_query_args );