Last active
June 24, 2021 08:45
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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