For many event organizers, using the Event Tickets plugin to track and manage attendees efficiently is fundamental.

Recently, updates to the Event Tickets plugin removed the security code column from the attendee list. That removal was a popular request among our plugin users, but we understand that it can be an important item for others, for verification and organization purposes.

If you’re missing these features, this guide will help you reintroduce these columns to your attendee list using a simple PHP snippet.

Inserting the PHP snippet

Carefully insert the following PHP code at the end of the functions.php theme file (ensure not to overwrite any existing code there) or by using the Code Snippets plugin:

add_filter ( 'tribe_events_tickets_attendees_csv_export_columns', function( $columns ) {
	$columns['security_code'] = 'Security Code';
	return $columns;
} );

add_filter ( 'tribe_events_tickets_attendees_table_column', function ( $value, $item, $column ) {
	if ($column === 'security_code') {
		 $value = $item['security_code'];
	}
	return $value;
}, 100, 3 );

add_filter( 'manage_tribe_events_page_tickets-attendees_columns', function ( $column_headers ) { 
    //create a  new set of column headers 
    $new_column_headers = []; 
	foreach ( $column_headers as $column_key => $column_name ) { 
		$new_column_headers[$column_key] = $column_name; 
		//Add order_date immediately after the ticket column 
		if ( 'ticket' == $column_key ) { 
			$new_column_headers['security_code'] = 'Security Code'; 
		} 
	}
	return $new_column_headers;
});

After you have inserted the code and saved it:

  • Go to the Attendees section under the Event Tickets menu in your admin panel.
  • Verify that the columns for Security Code and Ticket ID are now present.
  • Check a few entries to ensure that the columns are populating correctly.

Here’s a screenshot showing how it should appear on your end, taken from one of our tests when using that snippet:

Conclusion

Reintroducing the Security Code column to your Event Tickets plugin attendee list can enhance your event management capabilities. This simple PHP modification allows better tracking and verification of attendees, ensuring smoother operation during your events.

Should you encounter any issues or require further customization, consider contacting a professional WordPress developer or consulting the plugin’s documentation and support forums for additional assistance.