add customer role filter to customer data store
This commit is contained in:
parent
6780ae0136
commit
bfd41fb577
|
@ -686,7 +686,8 @@ class WC_Admin_Reports_Customers_Data_Store extends WC_Admin_Reports_Data_Store
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( $customer->get_order_count() < 1 && 'customer' !== $customer->get_role() ) {
|
||||
$customer_roles = (array) apply_filters( 'woocommerce_admin_customer_roles', array( 'customer' ) );
|
||||
if ( $customer->get_order_count() < 1 && ! in_array( $customer->get_role(), $customer_roles, true ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue