Give access to other WordPress user roles
Grant Chamevo admin access to Shop Managers, Editors, or custom WordPress roles.
By default, only WordPress Administrators can access the Chamevo admin menu (Products, Product Builder, Settings, Orders, etc.). You can grant access to other roles β Shop Managers, Editors, or custom roles β by adding the Chamevo capability to that role.
How Chamevo permissions work
Chamevo uses a single WordPress capability: edit_chamevo. Any user with this capability can access all Chamevo admin menus and features. WordPress Administrators receive this capability automatically when the plugin loads.
Grant access to a role
Option A: Use a role editor plugin
The simplest approach is to use a role management plugin:
- Install and activate User Role Editor or Members.
- Go to Users β User Role Editor (or the equivalent menu for your plugin).
- Select the role you want to grant access to (e.g., Shop Manager).
- Find and enable the
edit_chamevocapability. - Save changes.
Users with that role now see the Chamevo menu in the WordPress admin.
Option B: Add via code
Add this snippet to your theme's functions.php or a site-specific plugin:
add_action('init', function() {
$role = get_role('shop_manager');
if ($role) {
$role->add_cap('edit_chamevo');
}
});
Replace shop_manager with the role slug you want to grant access to. Common role slugs:
| Role | Slug |
|---|---|
| Shop Manager | shop_manager |