I’m trying to display all product variants with a specific attribute.
E.g. all the t-shirts which are blue.
I’m trying to use this code, but it doesn’t seem to filter based on the key and value input.
Do I have to do more than this or is it not possible to be doing it this way?
$meta_query_args = array( 'relation' => 'OR', array( 'key' => 'Custom_Attribute', 'value' => 'Color', 'compare' => '=' ) ); $meta_query = new WP_Meta_Query( $meta_query_args );