我有这个数组
array[] = [brands-processors] => Array (
[taxonomy] => product_cat
[field] => id
[terms] => 105,315
[compare] => IN
)
[cpu-socket] => Array (
[taxonomy] => product_cat
[field] => id
[terms] => 206
[compare] => IN
)
[cpu-type] => Array (
[taxonomy] => product_cat
[field] => id
[terms] => 219
[compare] => IN
)
但我想将其传递给元查询wordpress函数
'tax_query' => array(
'relation' => 'OR',
array(
'key' => 'mykey',
'value' => 'value1',
'compare' => '='
),
array(
'key' => 'mykey',
'value' => 'value2',
'compare' => '='
),
)
我如何实现这一点,或者是其他任何方式,然后是array_puch
我试过但想要创建上面的结构
'tax_query' => array(
'relation' => 'OR',
$myArray
)