Improved Admin Search Orders
Once your woocommerce site hits 100,000+ orders, searching for an order via the wordpress admin -> order page can take a long time. For my site, my search request always times out (90 seconds+) for a search, and I am running a very powerful set up hardware wise.
So I found a way to include a dropdown on the Order page, so you can select the field you want to search by, then I changed the query to only search for the specified field from the dropdown. This changed the query time from 90 seconds+ to 1-3 seconds.
My way is a hack unfortunately, and I don't have the time to find the proper way to do it, but the proper way would be to:
-have a dropdown next to the search field that is populated by woocommerceshopordersearchfields (that way it is dynamic in the scenario a user changes that list via functions.php or a plugin).
-change the search query to only search for the specified field from the dropdown
Would love to see this as a part of the core woocommerce.

1 comment
-
Jonathan Sciabica commented
AGREED!!!
My order search is painful and eats up my server resources to the point of 503 errors.
In addition to limiting the field of search, it should also limit the time frame. I wish I could only search orders placed in the last 90 days by default. If we want to go back further, we'd have to choose to do so from a drop down.