Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

metastock

$meta_query = array(
	'relation' => 'AND',
	array(
		'key'     => '_stock_status',
		'value'   => 'outofstock',
		'compare' => 'NOT IN',
	),
);