title: Query product title or slug based on shortcode atts name in Woocommerce
body: <p>I would like to query a product by it's title or name (slug). The code below will allow me to retrieve a product with a specific tag, however when I attempt to use <code>page</code> or <code>pagename</code> instead of <code>product_tag</code>, no products are returned. I did not see a relevant <code>product_page</code> or similar available unless I have overlooked it. Appreciate insight into where I may have gone wrong.</p>
  
  <pre><code>function woo_products_by_name_shortcode( $atts, $content = null ) {
  
          // Get attributes
          extract(shortcode_atts(array( "tags" =&gt; '' ), $atts));
  
          ob_start();
          // Define Query Arguments
          $args = array(
                                  //'post_type'    =&gt; array('product','product_variation'),
                                  'post_type'    =&gt; 'product',
                                  'posts_per_page' =&gt; 5,
                                  'product_tag'    =&gt; $tags
                                  );
  
          // Create the new query
          $loop = new WP_Query( $args );
  
          // Get products number
          $product_count = $loop-&gt;post_count;
  
          // If results
          if( $product_count &gt; 0 ) :
  </code></pre>