kreamweb
5/29/2017 - 12:54 PM

Example to how change the search string

Example to how change the search string

<?php


add_filter('yith_wcas_search_with_like', '__return_true');
add_filter( 'yith_wcas_search_string_manipulation', 'my_yith_wcas_search_string_manipulation' );

function my_yith_wcas_search_string_manipulation( $string ) {

 $string = str_replace( '$', '%', trim( $string ) );
 $string = str_replace( '.', '%', trim( $string ) );

 return $string;

}