Related issue: Multiple relationship for multiple tax_query in WP_Query
The issue here was that mixed multi-relationship lookups are only permitted using the term_taxonomy_ids
field in the query, the above worked fine once switched like so:
$params = [
"status" => "publish",
"tax_query" => [
[
"taxonomy" => "jewellery_metal",
"field" => "term_taxonomy_id",
"terms" => [
36, // "yellow-gold-jewellery"
37, // "white-gold-jewellery"
34, // "rose-gold-jewellery"
]
],
[
"taxonomy" => "jewellery_availability",
"field" => "term_taxonomy_id",
"terms" => [
44, // "sold"
49, // "unaccounted"
],
"operator" => "NOT IN"
],
"relation" => "AND"
],
"post_type" => "product"
]
Annoying WordPress Docs don’t specify this, or at minimum suggest all queries are done on the term_taxonomy_id
if it’s the only one that supports all specified functionality.