A while back a client, by which I mean every client I’ve ever had with a woocommerce store on their site, asked me if they can search through their orders to find all orders that contain a certain item. As my introduction to Woocommerce was a little over a year ago, I knew the functionality wasn’t there but I wasn’t sure how to add it.
Being the good forward thinker that I am, I put it on my “Deal with this eventually list” and proceeded to move on to issues that had deadlines and that clients were actually paying me to fix for them. In a few moment of downtime the other week, I decided to revisit the issue. Much to my delight, I found some definitive answers on how to make this happen.
This recent post on Stack Exchange contained code and a solution cobbled together by 3 or 4 different users.
I grabbed it, tested it on a few of my test sites, and gleefully found that it added the exact ability so many of my clients had been looking for. Searching for these answers before last month turned up many scarce results, so I decided to wrap the code in an easy to install plugin and throw it out there for anyone who might need it. Please be aware of a few things.
I did not write this code, merely compiled the solution from the stack exchange thread into a plugin so all you have to do is install and not worry about modifying your functions file in your theme.
Code for this plugin was gathered from this post on stack overlow and is made available in plugin form for ease
Code comes from Stack Overflow Users blacksquare, jibby, helgatheviking, and the person who created the post Nikos
I offer no guarantees and take no responsibility for the use of this code.
I will not be supporting or updating this
[button link=”http://beezenwebdesign.com/downloads/WoocommerceAddSearchBySkuToOrderSearch.zip” color=”#275276″ size=”3″ style=”1″ dark=”0″ radius=”10″ target=”blank”]Download Woocommerce Search Orders By Item or Sku Plugin[/button]
For those who don’t want the plugin, just the code – here it is:
// Code for this plugin was gathered from this post on stack overlow and is made available in plugin form for ease
// Code comes from Stack Overflow Users blacksquare, jibby, helgatheviking, and the person who created the post Nikos