Skip to main content
UTB Product Builder introduces a set of custom WordPress capabilities and a dedicated role, UTB Product Manager, designed for support staff and operations users who need to manage products and orders without access to the broader WordPress admin.

Custom capabilities

The plugin defines six custom capabilities:
CapabilityPurpose
utb_manage_settingsRead and update plugin configuration settings
utb_manage_flowsAssign flows to products via the Assign Flows page
utb_view_webhooksView webhook logs and configuration
utb_manage_programsAdd, edit, and remove program catalog entries
utb_manage_certificatesAdd, edit, and remove certificate types and pricing
utb_view_ordersQuery order data and view order metadata
These capabilities can be checked anywhere in PHP using the standard WordPress function:
if ( current_user_can( 'utb_manage_settings' ) ) {
    // Allow access
}

The UTB Product Manager role

The role slug is utb_product_manager. When created, it receives the following capability set: WordPress core
CapabilityGranted
readYes — basic admin panel access
manage_optionsYes — required for admin menu visibility (see menu restrictions below)
WooCommerce — products
CapabilityGranted
read_productYes
read_private_productsYes
edit_productYes
edit_productsYes
edit_published_productsYes
edit_private_productsYes
publish_productsNo — cannot publish; only edit
delete_productsNo — cannot delete
WooCommerce — orders
CapabilityGranted
read_shop_orderYes
read_private_shop_ordersYes
edit_shop_orderYes
edit_shop_ordersYes
edit_others_shop_ordersYes
edit_published_shop_ordersYes
edit_private_shop_ordersYes
delete_shop_ordersNo
UTB Product Builder
CapabilityGranted
utb_manage_settingsYes
utb_manage_flowsYes
utb_view_webhooksYes
utb_manage_programsYes
utb_manage_certificatesYes
utb_view_ordersYes
When a user with the utb_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
Only WooCommerce and UTB Builder remain visible. The role user’s admin experience is scoped entirely to product and order management.
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.
In the WordPress admin sidebar, click UTB Builder, then click Roles & Permisos. The page shows:
  • Estado del Rol — whether the utb_product_manager role 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

1

Navigate to Roles & Permisos

Go to WordPress Admin > UTB Builder > Roles & Permisos.
2

Check role status

The Estado del Rol card shows Rol no creado with a red indicator if the role does not exist yet.
3

Click Create Role

Click Crear Rol. The plugin calls WordPress add_role() with the utb_product_manager slug and all capabilities listed above. A success notice confirms the role was created.

Updating role capabilities

If the plugin is updated and introduces new capabilities, you must manually re-sync the role’s capability set:
1

Navigate to Roles & Permisos

Go to WordPress Admin > UTB Builder > Roles & Permisos.
2

Click Update Role Permissions

Click Actualizar Permisos del Rol. The plugin removes all existing capabilities from the role and re-adds the current canonical capability set. A success notice confirms the update.
Run Actualizar Permisos del Rol after every major plugin update to ensure the role’s capabilities stay in sync with the current version.

Deleting the role

1

Navigate to Roles & Permisos

Go to WordPress Admin > UTB Builder > Roles & Permisos.
2

Click Delete Role

Click Eliminar Rol. A confirmation dialog warns that users assigned to this role will lose it. Confirm the deletion.
Deleting the role does not delete the users. Users who had the utb_product_manager role will revert to having no role (WordPress treats this as a user with no capabilities). Re-create the role and re-assign users if the deletion was unintentional.

Assigning users to the role

1

Ensure the role exists

The Asignar Usuarios al Rol section is only visible after the role has been created.
2

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.
3

Select the user and assign

Select the user and click Asignar Rol. A success notice confirms the assignment. The user’s name appears immediately in the Usuarios con rol UTB Product Manager table.

Removing the role from a user

1

Locate the user in the assignment table

On the Roles & Permisos page, find the user in the Usuarios con rol UTB Product Manager table.
2

Click Remove Role

Click the Remover Rol button in the user’s row. A confirmation dialog asks you to confirm. Confirm the removal. A success notice confirms the role was removed from the user.

For developers: PermissionsHelper

If the plugin includes a PermissionsHelper 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:
use UTB\ProductBuilder\Utils\PermissionsHelper;

if ( PermissionsHelper::can_manage_settings() ) {
    // Show settings UI
}

if ( PermissionsHelper::can_view_webhooks() ) {
    // Show webhook logs
}
This pattern makes it straightforward to add additional role types or granular permission scoping in future releases without touching every call site.

Build docs developers (and LLMs) love