title: Why do I get no products when use pre_get_posts in wordpress
body: <p>is there any known reason why I get 'no products found' when use <code>pre_get_posts</code> </p>
  
  <pre><code>add_action( 'pre_get_posts', 'rc_modify_query_get_design_projects' );
  function rc_modify_query_get_design_projects( $product ) {
    global $wp_query;
       $product-&gt;set('post_type', 'product_variation');
  }
  </code></pre>
  
  <p>I'm using <code>pre_get_posts</code> to modify main wpquery to get variable products as single products because plugin filters only work with main wpquery if I'm right</p>