• Hi,

    I’ve WordPress 4.2.2 with latest version of woocommerce installed.

    The website works fine from the front end. Searching products is fine and it seems everything is ok.

    On the back end, when I try to type a product’s name on the products page of woocommerce, I get nothing found.

    When trying to use the filter to select a specific product category, nothing works too.

    When I open a product’s page on woocommerce, everything seems fine. Products have the right tags and categories.

    The website was working fine on an older wordpress version and another theme. The changes I made just updated wordpress and changed the theme.

    Can anyone help me with this?

    https://www.ads-software.com/plugins/woocommerce/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Tony.N

    (@tonyn-1)

    “On the back end, when I try to type a product’s name on the products page of woocommerce, I get nothing found. ”

    means, when I try to search a product on the search bar of woocommerce.

    I’m not using woo commerce but I have the same problem with a new update to 4.2.2 and the post filter and post searching on the admin screens aren’t working.

    Post searches return an empty result set and post filtering just returns the default result set.

    I found that the Search functionality was related to the Search Everything plugin.
    When disabled, post searches worked fine but post filtering still failed to have any effect.
    I reviewed the Search Everything settings and found that it appeared that settings just needed updating because after that, searching worked fine. Still trying to resolve the filtering.

    I’ve disabled all plugins and still can’t filter by post category.

    Same problem for me! No problems on frontend side, but when i try to search a product on woocommerce backend, i have no result. In add, after any editing on pages, products etc… the backend returns always on the articles list. Very annoying!!

    My configuration: WP 4.2.2 – WC 2.3.9 – YITH Boemia Theme and these plugins:

    AfterShip – WooCommerce Tracking
    Anti-spam
    Notifica Cookie
    Google XML Sitemaps
    HC Custom WP-Admin URL
    Easy HTTPS (SSL) Redirection
    Limit Login Attempts
    MailChimp for WordPress Lite
    Social Login
    P3 (Plugin Performance Profiler)
    Remove query strings from static resources
    Shareaholic
    SZ – Google
    TinyMCE Advanced
    UpdraftPlus – Backup/Restore
    WooCommerce – Store Exporter
    WooCommerce Payment Fees Lite
    Woocommerce Poor Guys Swiss Knife
    WooCommerce Product Gift Wrap
    WP-Optimize
    WP Smush
    YITH WooCommerce Ajax Navigation
    YITH WooCommerce Ajax Search
    YITH Woocommerce Compare
    YITH WooCommerce Mailchimp
    YITH WooCommerce Wishlist

    So, in the off chance that someone else has a similar situation… here’s what ended up solving this issue for us.

    We have several categories that should never appear in search results so, we had the following search filter in our custom theme functions file.

    function SearchFilter($query) {
        if ($query->is_search) {
            $query->set('cat','-1572,-1353,-1555,-689');
        }
        return $query;
    }
    add_filter('pre_get_posts','SearchFilter');

    That worked fine until we upgraded to WP 4.2.2. WP was several versions out of date at time of update, so the change may not have been in 4.2.2 but somewhere along the line something changed making this filter problematic on the back end. So, we added another condition to our if statement

    && !is_admin()

    and that solved the problem for us.

    Oh, and BTW, we also noticed that for some reason… this filter function changed the admin category filter form method from POST to GET. That was our first clue to solving this.

    @nickoonce, your solution works.
    After I added !is_admin() in my SearchFilter() function, it started working.

    Thanks for sharing!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Filter & Admin Search Don't work’ is closed to new replies.