There are a lot of people who use WooCommerce to sell their products to customers and wholesalers. For those people who are it would be nice to be able to display all orders that are made by wholesalers or customers. In this post I will show you how you can easily add a new drop down to filter by user role, just next to the ‘Search for a customer’ drop down in the order overview in the admin.
Adding a peace of code
In order to create the drop down, and the functionality to filter the orders on user role, I’ve created a peace of code that can be added to your themes functions.php. Its best to add it there as it are only two functions, and not really worthy of creating a plugin if you just want to use this functionality. Of course feel free to create a separate plugin if you want to 🙂
That will do everything you will need to add a drop down to the shop order admin area of WooCommerce.