1. Home
  2. WC Vendors Marketplace
  3. Code Snippets
  4. Allow WooCommerce Shop Managers to manage vendors

Allow WooCommerce Shop Managers to manage vendors

If you want your shop manager users to be able to manage vendors you will need to modify the shop manager role. This is due to the fact that WooCommerce limits which users that the shop_manager role has access to. 

The following code snippet will add the required capabilities for your shop managers. 

This snippet was provided by eftcolombus on our wordpress.org support forums.  Thanks!

/* Lets Shop Managers edit users with these user roles */
function wcv_allow_shop_manager_role_edit_capabilities( $roles ) {
$roles[] = ‘vendor’; // insert the role you want them to be able to access here, copy+paste this line for additional user roles
return $roles;
add_filter( ‘woocommerce_shop_manager_editable_roles’, ‘wcv_allow_shop_manager_role_edit_capabilities’ );
Updated on March 8, 2021

Was this article helpful?