Skip to content

Role visibility

Every endpoint, group and link carries a user roles field. It is an allowlist:

  • Leave it empty and the item is visible to everyone.
  • Select one or more roles and only users with one of those roles see the item.

This applies to both:

  • The rendered menu (items outside a user’s roles are removed before the menu is built).
  • The default-endpoint redirect. A member is never redirected to a default endpoint that is hidden from their role; they land on the standard dashboard instead.

Children of a group are filtered by role independently of the group itself.

  • Show a wholesale tab only to a wholesale_customer role.
  • Show admin tools only to administrator.
  • Show a members-only section only to a membership role assigned by WooCommerce Memberships, WooCommerce Subscriptions or a similar plugin.

Hiding a menu item removes it from the navigation and from the default-endpoint redirect. If an endpoint holds sensitive content, treat the role allowlist as visibility control and add your own capability check inside that content where you need a hard access boundary.