Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

two taxonomies

$tax_query = array(
	'relation' => 'AND',
	array(
		'taxonomy'         => 'product_cat',
		'terms'            => '$term->id',
		'field'            => 'term_id',
	),
	array(
		'taxonomy'         => 'product_brand',
		'terms'            => '$parentid',
		'field'            => 'term_id',
	),
);