Hidden products showing up in search results #1651

Closed
nathanielks opened this Issue Oct 25, 2012 · 2 comments

Projects

None yet

3 participants

@nathanielks
Contributor

Is this correct? I thought that hidden products were supposed to be filtered out of the search results? Currently I'm using WooCommerce's product search widget for search results. I can see in the query vars that it's doing a meta query for visible products, but it apparently isn't working...

Here's a dump of the query_vars for the page:

array (size=58)
  'post_type' => string 'product' (length=7)
  'error' => string '' (length=0)
  'm' => int 0
  'p' => int 0
  'post_parent' => string '' (length=0)
  'subpost' => string '' (length=0)
  'subpost_id' => string '' (length=0)
  'attachment' => string '' (length=0)
  'attachment_id' => int 0
  'name' => string '' (length=0)
  'static' => string '' (length=0)
  'pagename' => string '' (length=0)
  'page_id' => int 0
  'second' => string '' (length=0)
  'minute' => string '' (length=0)
  'hour' => string '' (length=0)
  'day' => int 0
  'monthnum' => int 0
  'year' => int 0
  'w' => int 0
  'category_name' => string '' (length=0)
  'tag' => string '' (length=0)
  'cat' => string '' (length=0)
  'tag_id' => string '' (length=0)
  'author_name' => string '' (length=0)
  'feed' => string '' (length=0)
  'tb' => string '' (length=0)
  'paged' => int 0
  'comments_popup' => string '' (length=0)
  'meta_key' => string '' (length=0)
  'meta_value' => string '' (length=0)
  'preview' => string '' (length=0)
  's' => string '' (length=0)
  'sentence' => string '' (length=0)
  'fields' => string '' (length=0)
  'category__in' => 
    array (size=0)
      empty
  'category__not_in' => 
    array (size=0)
      empty
  'category__and' => 
    array (size=0)
      empty
  'post__in' => 
    array (size=0)
      empty
  'post__not_in' => 
    array (size=0)
      empty
  'tag__in' => 
    array (size=0)
      empty
  'tag__not_in' => 
    array (size=0)
      empty
  'tag__and' => 
    array (size=0)
      empty
  'tag_slug__in' => 
    array (size=0)
      empty
  'tag_slug__and' => 
    array (size=0)
      empty
  'orderby' => string 'title' (length=5)
  'order' => string 'asc' (length=3)
  'meta_query' => 
    array (size=3)
      0 => string '' (length=0)
      1 => 
        array (size=3)
          'key' => string '_visibility' (length=11)
          'value' => 
            array (size=2)
              0 => string 'visible' (length=7)
              1 => string 'catalog' (length=7)
          'compare' => string 'IN' (length=2)
      2 => 
        array (size=0)
          empty
  'posts_per_page' => int 9
  'wc_query' => boolean true
  'ignore_sticky_posts' => boolean false
  'suppress_filters' => boolean false
  'cache_results' => boolean true
  'update_post_term_cache' => boolean true
  'update_post_meta_cache' => boolean true
  'nopaging' => boolean false
  'comments_per_page' => string '50' (length=2)
  'no_found_rows' => boolean false
@sjeden
Contributor
sjeden commented Oct 26, 2012

Working fine on my install. I have the latest beta version.

@mikejolley
Member

It needs to be a product search (&post_type=product in the url) otherwise it doesn't use the products loop and we cannot control the output. Not a bug.

@mikejolley mikejolley closed this Nov 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment