In one of my theme page, I use:
$args = array(
'post_type' => 'product',
'post_status' => 'publish',
'ignore_sticky_posts' => 1,
'posts_per_page' => 10,
'meta_key' => 'total_sales',
'orderby' => 'meta_value_num',
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => 'books'
)
)
);
$output = '';
$p = new WP_Query( $args );
Then I got:
Warning: Illegal string offset 'taxonomy' in /Applications/MAMP/htdocs/DE3/Skbooks/public_html/wp-content/plugins/elasticpress-woocommerce/elasticpress-woocommerce.php on line 200
In one of my theme page, I use: $args = array( 'post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => 10, 'meta_key' => 'total_sales', 'orderby' => 'meta_value_num', 'tax_query' => array( 'relation' => 'OR', array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => 'books' ) ) );
Then I got:
Warning: Illegal string offset 'taxonomy' in /Applications/MAMP/htdocs/DE3/Skbooks/public_html/wp-content/plugins/elasticpress-woocommerce/elasticpress-woocommerce.php on line 200