title: How to get only simple products and product variations (variable products excluded) based on a specific category in WooCommerce?
body: <p>I need to retrieve all simple products and product variations that:</p>
  <ul>
  <li>Have <code>post_status</code> equal to <code>publish</code>;</li>
  <li>Simple products and product variations belong to a specific product category (in my case <em>mobile</em>);</li>
  </ul>
  <p>But <strong>excluding the variable products</strong>.</p>
  <p>So far I have tried this code but it doesn't work:</p>
  <pre><code>$arg_product_filter = array(
      'nopaging'       =&gt; true,
      'post_status'    =&gt; array( 'publish' ),
      'posts_per_page' =&gt; -1,
      'post_type'      =&gt; array( 'product', 'product_variation' ),
      'tax_query'      =&gt; array(
          'relation' =&gt; 'AND',
          array(
              'taxonomy' =&gt; 'product_type',
              'field'    =&gt; 'slug',
              'terms'    =&gt; array( 'simple', 'variation' ),
          ),
          array(
              'taxonomy' =&gt; 'product_cat',
              'field'    =&gt; 'slug',
              'terms'    =&gt; 'mobile',
          )
      ),
  );
  $the_query = new WP_Query( $arg_product_filter );
  </code></pre>
  <p>This query returned only simple products and if I change the relation to 'OR' it returns variable products as well. What I am doing wrong?</p>