Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
jrood

Filter by User Role on WooCommerce Orders

Is there a way to filter orders based on the user role of the customer who created the order? We’ve added in our own custom user roles cloned from the customer role and we’d like to filter orders based on these custom roles.

I did find a bit of code to unset fields based on user role, but I didn’t come across anything to help me filter the orders.

5 years, 8 months ago
Stefan van den Dungen Gronovius
Developer

Our ‘Customer’ column should be able to filter your order based on user role.
When you add the customer column, you can change the display field to role.
Both our Smart Filtering and Filtering feature allows you to filter the overview.
So you can enable the ‘filtering’ option to have both or leave it disabled for only Smart Filtering support.

5 years, 8 months ago
dan11

Hi guys !

The Orders list Role column and filter works great for us – cheers !
We have created admin links for our staff to pages showing Just
the orders from general Customers, and different customer roles, eg:

A page listing Just the orders from general Customers:
/wp-admin/edit.php?s&post_status=all&post_type=shop_order&action=-1&m=0&_customer_user&acp_filter[5bcd4f089807a]=customer&filter_action=Filter&paged=1&action2=-1

And a page listing Just the orders from a customer role called customer_b2b:
/wp-admin/edit.php?s&post_status=all&post_type=shop_order&action=-1&m=0&_customer_user&acp_filter[5bcd4f089807a]=customer_b2b&filter_action=Filter&paged=1&action2=-1

However something we need is to display orders by Anonymous users who have Not created an account.
We need these in the page also listing orders from general Customers.

So how can we filter to show just orders by Anonymous users ? Something like this ?
&acp_filter[5bcd4f089807a]=anonymous ?

And then how could we show the orders from the 2 roles of Customers and Anonymous together ? Something like this ?
&acp_filter[5bcd4f089807a]=customer+anonymous ?

cheers !
Daniel from Australia

5 years, 8 months ago

You must be logged in to reply to this topic.