Skip to content

Instantly share code, notes, and snippets.

@wtmujeebu
Last active June 24, 2021 08:45
Show Gist options
  • Save wtmujeebu/5bf0fda66510fb4a615af8df4009e3b8 to your computer and use it in GitHub Desktop.
Save wtmujeebu/5bf0fda66510fb4a615af8df4009e3b8 to your computer and use it in GitHub Desktop.
Allow Shop Managers to add another role user - using Import Export WordPress Users and WooCommerce Customers plugin by WebToffee
<?php
/**
* Allow Shop Managers to add another shop manager/custom role
*/
function wt_shop_manager_role_edit_capabilities($roles) {
$roles[] = 'shop_manager'; // change role here for custom roles
$roles[] = 'customrole'; // change role here for custom roles
return $roles;
}
add_filter('woocommerce_shop_manager_editable_roles', 'wt_shop_manager_role_edit_capabilities');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment