Customers
important
This feature is requires an upgrade to WooCommerce POS Pro.
Capabilities
Cashiers will need the list_users, create_users and edit_users capabilities to use all the Customer features.
WordPress Multisite
When using WordPress multisite there are some extra checks to prevent non Super Admins from creating and editing customer.
First, in order for non Super Admins to create new customers, please enable the following option in Network Admin > Settings
.
Additionally, in order for non Super Admins to edit customer details, you will need to add the manage_network_users
capability to the cashier.
functions.php
// change the CASHIER_ID, and
// add to your functions.php file
add_filter('map_meta_cap', 'wc_pos_map_meta_cap', 10, 3);
function wc_pos_map_meta_cap($caps, $cap, $user_id){
if(is_pos() && $cap == 'edit_users' && $user_id === CASHIER_ID){
$caps = array('edit_users');
}
return $caps;
}