Support » Plugin: Ajax Search for WooCommerce » Plugin not compatible with Relevanssi

  • MikaelG

    (@armbreaker)


    Hi.

    I just installed your plugin and noticed that the search doesn’t work in regards of showing search results from product titles. It only shows tags and categories (if those are enabled in settings) or else the search results is empty no matter which search term is used.
    I saw a thread that mentioned incompatibility with Relevanssi. So I tried by deactivating Relevanssi and your plugin started working as intended. Search results is showing product titles.

    In the old thread you stated that you would add add compatibility with Relevanssi in upcoming version. Did you add compatibility and this a new bug due to changes with Relevanssi? Or didn’t you add support for some reason?

    And, big thanks for this plugin, really nice work. Hope you can fix this issue, so I can keep on using it.

    Best regards,
    Mikael

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think you’d get pretty close if you modify /includes/Engines/WordPressNative/Search.php and change this:

    $products = get_posts( $args );

    to this:

    if ( ! function_exists( 'relevanssi_do_query' ) ) {
        $products = get_posts( $args );
    } else {
        $wp_query = new WP_Query();
        $wp_query->parse_query( $args );
        relevanssi_do_query( $wp_query );
        $products = $wp_query->posts;
    }
    MikaelG

    (@armbreaker)

    Is that in your plugin or this plugin?
    So which plugin is causing this. And which one needs to change the code, as I can’t be alone having both this awesome plugins installed 🙂

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