Created
May 29, 2017 12:54
-
-
Save kreamweb/defab639f9c01f14a4ab507a6cc4f22b to your computer and use it in GitHub Desktop.
Example to how change the search string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment