By default, the capability to export attendees within the Event Tickets plugin is assigned to users with the publish_pages capability, including Super Admins, Admins, and Editors. However, organizations may wish to extend this functionality to custom user roles. The tec_tickets_attendees_user_can_export_csv filter hook can be utilized to grant the necessary permissions to these roles.

To enable custom user roles to export attendees, add the following PHP code to your site:

Add the code snippet to the functions.php file of your theme, or use your preferred method for integrating snippets into your WordPress site, such as the free Code Snippets plugin.

This code snippet leverages the tec_tickets_attendees_user_can_export_csv filter to assess the capabilities of the current user. If the user possesses the specified custom role (ensure that your_custom_role is replaced with the actual role slug), the filter permits the user to export the attendee.