The whole problem was in WooCommerceCategoryExcluder
(old, obsolete and unmaintained) plugin which hooks to pre_get_posts
and adds taxonomy query to get_posts()
args.
Maybe this investigation helps someone else trying to solve similar problem.
Related Posts:
- Use both meta query and tax query
- Searching in title or meta, with a tax query too!
- Get Posts from Custom Meta Query
- get posts meta query returning the latest post if no meta key found
- Using get_posts, I need to use a combination of OR & AND relations
- Sorting not working with get_posts
- Nested meta_query with multiple relation keys
- Get result from meta_query() between two numbers
- Query between two meta keys
- Archives for custom post type based on a “date” meta value
- get_users meta_query
- Meta query with multiple logic (AND / OR)
- meta_query with multiple values
- Meta Query with date and time on the same Day before given time
- Return posts with specific meta key first, but the rest in alpha order by last name
- Multiple Values stored as array in Meta Query
- Advanced orderby with multiple meta_query
- Using get_terms() with meta_query parameters
- Problem with get_posts, tax_query and counting the number of posts
- WP_User_Query with meta_query array relation ‘OR’
- Loop through two different sets of custom fields
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- meta_query problem
- meta_query date and time comparisons
- How to exlude posts that have certain meta_value?
- meta_query results not the same with and without spaces
- meta_query all posts between to ages
- WordPress Core – Optimizing meta_query generated SQL?
- WP_Query, tax_query and term_meta: How to?
- Nested Queries using meta_query
- Display no post when metavalue is 0
- Wildcard with LIKE operator in Meta query
- Meta Query Compare with Date
- Does meta_query working with value paramater higher then 999?
- meta_query keys and sticky posts
- WP_Query ordered by meta_value_num doesn’t fetch posts without this meta field
- Custom post type archive with rand and meta_value
- How to query post only with different excerpt?
- Is it a good idea to improve meta query performance by adding tax query?
- WP_Query with meta_query no results
- Why is this query not working? (Standard posts + custom post type)
- Using meta_query and tax_query at the same time
- Documentation for post meta
- Tax query AND/OR meta query [duplicate]
- Get posts with multiple meta values
- How to use meta query for greater than value in array?
- Wp Query custom search by meta query
- Filter posts by meta query?
- User meta query results in PHP notice: only variables should be passed by reference
- Meta query date column add [x] days to validate
- wordpress Meta_query between numbers range (not working)
- Orderby doesn’t work like expected on custom query
- WP_query – Filter by tax_query and meta_query using multiple select
- I would like to have add_post_meta to return the ID instead of true or false
- Order by meta value
- Is it possible to query posts with tax queries after multisite switch_to_blog() function?
- meta_query in WP_User_Query not working – returns every user, not just users where key & value matches
- Set both meta_query and tax_query using wp_query->set
- meta query or with meta value
- meta_query array in ‘values’ returns an error
- get_users with Serialized Custom Meta Value
- Function using get_posts() with tax_query not working when called from functions.php
- Unable to use meta_query between currency values when value is over 1 million
- Filtering all posts AND sticky posts through meta_query
- How to cache the results of a query and display the cached results
- get_posts query is taking about 40 seconds to execute
- How to send variable to wp meta_query value?
- I’m having trouble with Related Product “tax_query” ‘terms’ value
- WP_Query for a taxonomy value OR a custom post type meta field
- get_user can’t read variable
- How to mark only one post as Featured post?
- How to count items of meta query?
- WordPress meta query with meta serialized data array value
- Reading Content in an Array as it relates to a meta_query
- wordpress meta query with multiple meta condition causing a load on server and slows down the server..!
- Meta_Query with multi select values
- Trouble with calling an imploded variable in an array
- Memory Leak in Processing Large JSON file
- Meta Query returning empty array
- Query for user roles and their skills
- Not able to get my custom search result using meta_query and tax_query together?
- like_escape notice when using LIKE in meta query
- meta_query for user ID in array
- Display query post based on two orderby value in wordpress
- Querying by meta key and value
- How to compare date in post meta value
- Which Meta Query Compare Method Should I use?
- Sort posts by post views and consider meta key
- How to output meta_key in wp_postmeta?
- meta_query and strange orderby behaviour
- Get_term with meta_query
- WordPress Meta Query very slow with NOT EXISTS comparison
- WordPress extremely slow when using get_posts with multiple meta_query relations
- ACF meta_query field treated as “0” resulting in false negative search when testing ranges
- WP Query Conditionally query meta and taxonomy
- Complex Taxonomy scheme
- Is it possible to customize meta query in this way?
- Ordering WP_Query results by second meta_key
- How making a new search box in admin post table working on a specific column
- wp_user_query with meta_value_num for leaderboard