WooCommerce versions prior to 3.0 would allow for the search of customers whose usernames were numeric only. That changed in version 3.0 and if the search is numeric, the search will only search by user id. If you have usernames that are numeric, however, you can hook into the AJAX action before WooCommerce does and use the previous search function (albeit slightly edited). Here’s a quick and dirty example of how this can be achieved:
Not sure what to do with code snippets? See What Do I Do With These Code Snippets?
Leave a Reply
You must be registered and logged in to post a comment.