Filter the allowed roles for the REST API. Danger: Make sure that the roles listed here cannot manage the shop.
array( 'customer', 'subscriber'
Sortie :
@param array $roles Array of allowed roles.
// Modifier la valeur avec le filtre 'woocommerce_rest_customer_allowed_roles'
add_filter('woocommerce_rest_customer_allowed_roles', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(array( 'customer') {
// Modifier la valeur
return array( 'customer';
}
Chargement des actualités...