SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID
					 FROM wp_posts  LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN (SELECT * FROM wp_postmeta WHERE meta_key = '_sale_price' AND meta_value > 0) sale ON (wp_posts.ID = sale.post_id)  LEFT JOIN (SELECT * FROM wp_postmeta WHERE meta_key = '_stock_status') stock ON (wp_posts.ID = stock.post_id) 
					 WHERE 1=1  AND ( 
  wp_posts.ID NOT IN (
				SELECT object_id
				FROM wp_term_relationships
				WHERE term_taxonomy_id IN (7)
			) 
  AND 
  wp_term_relationships.term_taxonomy_id IN (720)
) AND ((wp_posts.post_type = 'product' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'wc-fraud-screen' OR wp_posts.post_status = 'wc-authorised')))
					 GROUP BY wp_posts.ID
					 ORDER BY  stock.meta_value ASC, sale.meta_value DESC, wp_posts.post_date DESC, wp_posts.ID DESC
					 LIMIT 0, 92

Gift Cards

Select Maker
Show All
Select Category
Bottles
Bowls
Dishes
Functional
Gift Cards
Jars
Jugs & Pourers
Lidded Pots & Boxes
Mugs & Drinking Vessels
Plates & Servers
Sculptural
Teapots
Tiles & Wall Art
Under £100
Under £50
Vases
Vessels
Select Material
Bone China
Earthenware
Porcelain
Stoneware
Select Firing
Electric
Gas
Oil
Raku
Salt Glaze
Soda Fired
Wood
Sorry, No Products Found
Load More Products
{ "post_type": "product", "paged": 1, "posts_per_page": 92, "tax_query": [{"taxonomy" : "product_cat","field": "slug","terms": ["gift-cards"],"operator":"IN" }], "meta_query": [{"relation": "AND","_stock_status": {"key": "_stock_status","compare": "EXISTS"},"_price":{"key":"_price","compare":"EXISTS","type":"NUMERIC"}} ],"post_status":"publish","orderby":{"_stock_status":"ASC","date":"DESC"} }