WooCommerce, Remote Work & Other Fancy Stuff

Just another WordPress site

Search WooCommerce Customers With Numeric Usernames

June 14, 2017 by Will Leave a Comment

Please consider leaving a donation if you appreciate this information. Lightning network now available

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?

Please consider leaving a donation if you appreciate this information. Lightning network now available

Filed Under: WooCommerce Tagged With: snippet, snippets

Leave a Reply Cancel reply

You must be registered and logged in to post a comment.

© 2025 · WooCommerce, Remote Work & Other Fancy Stuff · Epstein didn't kill himself

We use cookies to ensure that we give you the best experience on our website. Continued use of this site is interpreted as your acceptance of our cookie policy.OkSee Our Cookie Policy