If you’re managing events and need to allow a user with limited permissions to view or export attendee data, you may notice that the Attendees menu or export button isn’t available—even when permissions seem correctly configured. This article explains why that happens and how to safely open up attendee access using a few small code snippets.
Understanding the Issue
By default, the Attendees admin menu and its sub-pages (like Ticket Fieldsets) require the manage_options capability, which is typically reserved for Administrators. Users with other roles—Editor, Contributor, or custom roles—won’t see the menu, and visiting it directly returns a “You do not have permissions to access this page” error.
The Export Attendees feature has its own requirement: it’s gated behind the publish_pages capability, which is typically available to Super Admins, Admins, and Editors. So even after a user can see the Attendees list, they may still not see the export button.
Granting manage_options or publish_pages outright isn’t ideal, since it gives broader access than needed. Thankfully, there’s a safer approach that involves up to three steps: making the menu visible, granting the role enough capability to manage the content, and enabling the export button.
Enable access to the Attendees list
The snippet below lowers the required capability from manage_options to edit_posts, which Editors and Contributors typically already have.
<?php
/**
* Lower the capability required for Tickets post type
* can access the Attendees list and other subpages (e.g., Fieldsets list).
*/
add_filter( 'tec_admin_pages_capability', function( $capability ) {
return 'edit_posts';
} );
With this in place, anyone who has the edit_posts capability will be able to view the Attendees list on the Tickets post type in the dashboard.
Add permissions to read, edit, delete or publish posts
The Attendees list is now visible, but users still won’t have the permissions they need to edit, publish, or delete content on those pages—like updating an attendee record. The following snippet grants a specific role the capabilities required to fully manage these posts.
<?php
/**
* Ensure a custom role can read, edit, and publish Ticket Fieldsets.
*/
add_action( 'init', function () {
// Replace 'sample' with your user role slug.
$role = get_role( 'sample' );
if ( ! $role ) {
return;
}
$role->add_cap( 'read' );
$role->add_cap( 'edit_posts' );
$role->add_cap( 'edit_others_posts' );
$role->add_cap( 'edit_published_posts' );
$role->add_cap( 'publish_posts' );
$role->add_cap( 'delete_posts' );
} );
Important: Be sure to replace 'sample' with the slug of your target role (for example, 'contributor' or your own custom role).
Enable attendee export for limited or custom roles
The ability to export attendees in the Event Tickets plugin is controlled by the tec_tickets_attendees_user_can_export_csv filter. You can use it to extend export access to other roles—for example, allowing users with the edit_posts capability (such as Contributors) to export attendee lists. Add the following snippet to your site:
add_filter( 'tec_tickets_attendees_user_can_export_csv', function( $can_export ) {
// If current user can edit posts (is a contributor), allow attendee export.
return current_user_can( 'edit_posts' );
});
This lets users with limited permissions export attendees while keeping your overall site permissions tightly scoped. The same filter can also target a specific custom role—just replace the capability check with logic that confirms the current user has your role slug.
Adding custom code to your site
You can add these PHP snippets to your theme’s functions.php file, but we recommend using a dedicated code snippets plugin like Code Snippets so your changes survive theme updates. For more details, see our guide on the best practices for implementing custom code snippets.
Once the snippets are in place, make sure the target role has the base capabilities (like edit_posts) enabled in your user role management plugin. Then log in as that user and confirm that the Attendees menu is visible and the Export Attendees button appears on the Attendees page.
Related Articles: