Custom capabilities
The plugin defines six custom capabilities:| Capability | Purpose |
|---|---|
utb_manage_settings | Read and update plugin configuration settings |
utb_manage_flows | Assign flows to products via the Assign Flows page |
utb_view_webhooks | View webhook logs and configuration |
utb_manage_programs | Add, edit, and remove program catalog entries |
utb_manage_certificates | Add, edit, and remove certificate types and pricing |
utb_view_orders | Query order data and view order metadata |
The UTB Product Manager role
The role slug isutb_product_manager. When created, it receives the following capability set:
WordPress core
| Capability | Granted |
|---|---|
read | Yes — basic admin panel access |
manage_options | Yes — required for admin menu visibility (see menu restrictions below) |
| Capability | Granted |
|---|---|
read_product | Yes |
read_private_products | Yes |
edit_product | Yes |
edit_products | Yes |
edit_published_products | Yes |
edit_private_products | Yes |
publish_products | No — cannot publish; only edit |
delete_products | No — cannot delete |
| Capability | Granted |
|---|---|
read_shop_order | Yes |
read_private_shop_orders | Yes |
edit_shop_order | Yes |
edit_shop_orders | Yes |
edit_others_shop_orders | Yes |
edit_published_shop_orders | Yes |
edit_private_shop_orders | Yes |
delete_shop_orders | No |
| Capability | Granted |
|---|---|
utb_manage_settings | Yes |
utb_manage_flows | Yes |
utb_view_webhooks | Yes |
utb_manage_programs | Yes |
utb_manage_certificates | Yes |
utb_view_orders | Yes |
Menu visibility restrictions
When a user with theutb_product_manager role logs in, the plugin automatically removes the following WordPress admin menu items via RolesManagerPage::hide_menus_for_role():
- Dashboard
- Posts
- Media
- Pages
- Comments
- Appearance
- Plugins
- Users
- Tools
- Settings
The
manage_options capability is granted to the role so that WordPress displays the admin menu at all. The plugin uses hide_menus_for_role() — called at priority 999 on the admin_menu hook — to strip all pages the role should not access. This means the capability is granted broadly but access is enforced visually and procedurally.Navigating to roles and permissions
In the WordPress admin sidebar, click UTB Builder, then click Roles & Permisos. The page shows:- Estado del Rol — whether the
utb_product_managerrole currently exists, how many users are assigned to it, and a summary of its permissions - Asignar Usuarios al Rol — a table of users currently assigned, and a dropdown to assign new users (visible only after the role is created)
- Permisos Incluidos en el Rol — a reference table of all capabilities granted
Creating the role
Check role status
The Estado del Rol card shows Rol no creado with a red indicator if the role does not exist yet.
Updating role capabilities
If the plugin is updated and introduces new capabilities, you must manually re-sync the role’s capability set:Deleting the role
Assigning users to the role
Ensure the role exists
The Asignar Usuarios al Rol section is only visible after the role has been created.
Find the user in the dropdown
Under Agregar Usuario al Rol, open the Seleccionar Usuario dropdown. It lists all WordPress users who do not already have the
utb_product_manager role.Removing the role from a user
Locate the user in the assignment table
On the Roles & Permisos page, find the user in the Usuarios con rol UTB Product Manager table.
For developers: PermissionsHelper
If the plugin includes aPermissionsHelper utility class, it provides a centralized API for capability checks across the plugin codebase. Use it instead of calling current_user_can() directly to ensure consistency with any future capability changes: