Filter WooCommerce Sales Reports by user role
|Author:||Stephen Sherrard Plugins (profile at wordpress.org)|
|WordPress version required:||4.4|
|WordPress version tested:||5.5.1|
|Added to WordPress repository:||28-10-2016|
|Total downloads:||1 094|
Click to start download
This is a very simple and lightweight plugin that allows you to filter the sales reports in WooCommerce by user roles. Works great with plugins like WooCommerce Wholesale Ordering and WooCommerce User Role Pricing where you have different role based pricing tiers or customer types. This plugin then would allow you to show sales reports for a specific customer type by selecting the appropriate role.
This only works for the “Orders” tab of the WooCommerce>Reports page. When you are on that tab of the reports page, you will see a “Filter by User Role” select box and a “Save and Update” button, near the bottom right-hand corner of the page. Simply select the role that you want to filter the order/sales reports by, and hit the save and update button. The selected role is saved in your user data so you can refresh the page or choose custom date ranges or other sections, etc., without losing your filter settings. To see all sales again, simply select “ALL” and press save and update again (which will delete the saved value from your user meta).
- Modified inline CSS for form container to make the position absolute so that it is still usable on smaller screens.
- Tested with WordPress 5.5.1 and WooCommerce 4.5.0
- Moved the form to the bottom right of the page, as WooCommerce 4.0.0 puts some horrible admin bar over the top of the admin notice area, which was hiding the form in its previous location
- Initial release