Created
May 11, 2021 10:36
-
-
Save jjmontalban/e6db52adc138a847b1099dac11932a52 to your computer and use it in GitHub Desktop.
Capacidad de asignar roles
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 | |
/** | |
* @snippet Capacidad de asignar roles a shop manager | |
* @author https://wordpress.org/support/topic/shop-manager-role-cannot-change-users-role/ | |
*/ | |
function myextension_shop_manager_role_edit_capabilities( $roles ) { | |
$roles[] = 'pending'; | |
$roles[] = 'customer'; | |
return $roles; | |
}; | |
add_filter( 'woocommerce_shop_manager_editable_roles', 'myextension_shop_manager_role_edit_capabilities' ); | |
add_theme_support( 'align-wide' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment