It looks like you want to list products with post_type=product etc.. AND have the same ean code. Therefore, in your place i would try with the line
'relation' => 'OR'
changed to
'relation' => 'AND'
Regards,
Related Posts:
- Extend product search with meta in WooCommerce
- Meta query with string starting like pattern
- compare meta_query in get_posts arguments
- Query WooCommerce orders where meta data does not exist
- Getting attachments by meta value
- querying with custom meta field with meta_query
- Order by meta_value_num DESC and meta_value ASC on WP 4.0
- WooCommerce: filter by parent product’s taxonomy and product variation’s meta data
- WordPress altering my custom query, How to fix it?
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- Order by meta_key in custom post type doesn’t affect the query
- WP Query – Get WooCommerce Products with variation that is in stock
- meta_key and meta_value not working together
- Order Posts by meta value AND published date
- Extending woocommerce admin product search
- How to make Meta Query case sensitive?
- Fetch Record based on meta key dates
- Meta_query with multiple keys and multiple values
- meta_query BETWEEN, but the range is stored in the custom field
- how to make members list directory through wordpress post custom meta key.
- Large AND OR query timing out
- meta_value_num not ordering all items
- meta_compare not comparing whole integer
- Display posts with specific value first in query
- Get every post with value in meta key
- Multiple meta_key ordering with pre_get_posts
- add_query_arg to compare and display events from a certain date
- Comparing 2 Decimal Numbers from custom fields and displaying posts
- meta_query weird behaviour, static int will work, but not user data
- Query multiple post types, but different order for each
- Order by the first array within a meta_query
- Woocommerce Shortcode which displays a table with product data
- Query ACF relationship field – Comparator IN – Value array
- ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- How do i create a custom post query when the meta value is an array?
- ElasticPress is (aparently) messing with my search filters
- WP Query – grouping posts by same meta key, adding together values from another key
- Woocommerce Get Orders By Meta Value
- meta_query is overriding default search
- Trouble with serialized metadata
- Comparing Meta Field date in WPQuery using Meta_Query?
- Getting posts by custom field value
- Query against multiple locations within single custom post type post
- WP_Query, ACF field and array
- Order by Date Custom Field
- Query by meta value (add a dropdown of all values)
- Order Posts By Custom Field That is an array of objects
- Custom WP_query and integrating into theme file
- Using custom field as ‘orderby’ value causing post grouping by publish date
- Compare meta key separation
- query post based on comparison
- Get posts by meta value except one post [closed]
- How to query posts based on lat-lng coordinate as post meta?
- Set Alias for meta_query arguments in get_posts()
- How can I use order_by to order by two meta_keys without excluding posts that don’t have those keys initialized?
- How to query only for products with status “in stock” in WooCommerce? [closed]
- WP_Query meta_query where meta value ends in space
- How do I create my own nested meta_query using posts_where / posts_join?
- How to combine tax_query and date_query in WordPress
- Order posts by meta value and Date
- Query sticky posts with thumbnails
- Order a query result by a numeric meta key even if it does not exist, but put the posts with meta key first
- Single meta_query query using OR instead of AND in request’s WHERE statement
- Woocommerce returns Product post_status as published even tho it is in status draft
- How to do meta_query for attachments?
- SQL: What is wrong with the following query (generated by WordPress WP_Query, ordering prices)
- Why isn’t my `meta_query` array functioning properly?
- Overwrite YoastSEO meta-tags with another page’s [closed]
- How to orderby multiple meta fields if some fields are empty
- Order by meta value (numeric value lower to higher)
- WP_Query with different postmeta filter for each categories
- How to compare a date in custom field with today’s date in custom WP_Query?
- Meta Query doesn’t works as espected
- Getting a custom post’s custom field based on another custom post’s custom field select
- Redirect Search to Form When No Product Results Are Found
- Issues with search after added meta_query
- get_posts custom field
- wp_query posts with custom fields number smaller than
- Woocommerce: order posts by meta key
- Multiple meta query from array
- Unlimited Page Sitemap Link
- WP_Query with 4 post meta field arguments gives 500 internal server error
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- How can I modify my meta_query to work with prices that are stored in the database that contain dollar signs and commas?
- Custom meta_query order for Elementor based on post meta key [closed]
- What’s wrong with this meta query? (order by meta key, then title, doesn’t work)
- Get unique post by meta value using wp_query
- WP Query. Ordering posts by another post types meta
- WP_Query to Retrieve Posts from WooCommerce Products that are Only in Catalog
- Get posts meta_query by repater field
- Query 3 meta_key and orderby
- wp_query sorting – one specific meta_key value at last and then sort by create date
- Using the same WP_Query for shop and widgets in WooCommerce shop
- meta_query not working with the_content()
- Get closest event where meta_key field is an array
- Set right order for query that returns posts based on two custom fields
- Meta_query weird behaviour
- Use meta query only 3 or more results?
- WordPress – Optimize the Meta Query for 3 meta keys at a time