• Resolved grahambudd

    (@grahambudd)


    1.8.0 of SearchWP Live Ajax Search breaks compatibility with Relevanssi Premium but the fix should be simple.

    In 1.8.0 you have the following logic to determine if Relevnassi is installed within class-relevanssi-bridge.php:
    if ( is_plugin_active( 'relevanssi/relevanssi.php' ) ) {
    $args['relevanssi'] = true;
    }

    This does not capture if Relevanssi Premium is installed. Changing those lines to the following works to detect the premium version of the plugin:
    if ( is_plugin_active( 'relevanssi-premium/relevanssi.php' ) ) {
    $args['relevanssi'] = true;
    }

    In 1.7.6 and earlier you detected Relevanssi by doing function_exists( 'relevanssi_do_query' ) which catches both. You could switch back to that, or do:
    if ( is_plugin_active( 'relevanssi/relevanssi.php' ) || is_plugin_active( 'relevanssi-premium/relevanssi.php' ) ) {
    $args['relevanssi'] = true;
    }

    Let me know if I can be of any additional assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Elio Bruno

    (@ambrelio)

    Hi @grahambudd,

    Thanks for reporting this issue and providing a comprehensive description of it!

    We will revert the check back to function_exists( 'relevanssi_do_query' ).

    In the mean time you could use this custom hook to make it work without the need to modify the plugin’s code:

    add_filter( 'searchwp_live_search_query_args', function( $args ) {
    
    	if ( function_exists( 'relevanssi_do_query' ) ) {
    		$args['relevanssi'] = true;
    	}
    
    	return $args;
    }, 20 );

    Thanks again!

    Thread Starter grahambudd

    (@grahambudd)

    Thank you for that information. The filter does work so we can use that until the plugin is updated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘1.8.0 bug with Relevanssi Premium’ is closed to new replies.