Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #295822

    When creating a manual order, when you type in a product name you receive a list of pages from the website and a few products. I contacted Woocommerce and changed the theme and the issue was solved. when we changed back to the Enfold theme the problem reappeared.

    #295851

    Hey ads-synergy!

    I guess you added some code to the theme functions.php file which breaks the woocommeerce search:

    
    function SearchFilter($query) 
    {
         if ($query->query_vars[s])
         {
             $query->query_vars[s]=htmlentities($query->query_vars[s]);
         }
         if ($query->query_vars[paged])
         {
             $query->query_vars[paged]=htmlentities($query->query_vars[paged]);
         }
         if ($query->query_vars[post_type])
         {
             $query->query_vars[post_type]=htmlentities($query->query_vars[post_type]);
         }
         if ($query->query_vars[product_count])
         {
             $query->query_vars[product_count]=htmlentities($query->query_vars[product_count]);
         }
         if ($query->query_vars[product_order])
         {
             $query->query_vars[product_order]=htmlentities($query->query_vars[product_order]);
         }
         if ($query->query_vars[product_sort])
         {
             $query->query_vars[product_sort]=htmlentities($query->query_vars[product_sort]);
         }
         return $query;
    }
     
    add_filter('pre_get_posts','SearchFilter');
    

    If I remove/comment out this code it works again

    Regards,
    Peter

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.