Attendee table columns
The attendee table in the event editor, and the CSV and XLS exports, can be extended with additional columns.
The three hooks
| Hook | Type | Purpose |
|---|---|---|
pom_events_assistants_table_headers |
Filter | The header labels, used by the table and the exports |
pom_events_assistants_table_columns |
Action | Renders extra cells in a table row |
pom_events_export_users_content |
Filter | Adds values to an exported row |
Adding a column to the table
Two steps: add the header, then render the cell.
add_filter( 'pom_events_assistants_table_headers', function ( $headers ) {
$headers['my_room'] = __( 'Room', 'my-plugin' );
return $headers;
} );
add_action( 'pom_events_assistants_table_columns', function ( $assistant_id, $assistant_info ) {
$room = get_user_meta( $assistant_id, 'my_room', true );
echo '<td>' . esc_html( $room ? $room : '–' ) . '</td>';
}, 10, 2 );
$assistant_id is the attendee's user ID; $assistant_info is their registration record, with email, comments, tel, country and status.
Echo a complete <td>, and escape everything. Print a dash for empty values, matching the plugin's own columns.
Adding a column to the exports
The headers filter is shared with the exports, so a header you add appears there too. Supply the value:
add_filter( 'pom_events_export_users_content', function ( $row, $assistant_id, $assistant_info ) {
$row['my_room'] = get_user_meta( $assistant_id, 'my_room', true );
return $row;
}, 10, 3 );
Use the same key as the header so the value lands in the right column.
Keep the two in step
Because the header filter feeds both surfaces, adding a header without supplying an export value produces an empty column in the file. Implement all three hooks together.
Column order
Headers are rendered in the order of the array. To place a column before the actions, insert it rather than appending:
add_filter( 'pom_events_assistants_table_headers', function ( $headers ) {
$actions = $headers['actions'] ?? null;
unset( $headers['actions'] );
$headers['my_room'] = __( 'Room', 'my-plugin' );
if ( null !== $actions ) {
$headers['actions'] = $actions;
}
return $headers;
} );
Escaping in exports
Export values are written into a file, not into HTML. Do not HTML-escape them; sanitize them as text and be aware that the export uses semicolons as separators, so a value containing one will affect the file.
What good columns look like
- A membership number, from user meta.
- A ticket type, from the WooCommerce order.
- A check-in mark, if you build one — the plugin records registrations, not attendance.
- A per-event answer collected by your own field.
What not to add
- Anything that makes the table wider than it can render. The panel is not a data grid.
- Sensitive data that does not need to be on screen. Everyone who can edit the event will see it.
- Values requiring a query per row on a large list. The table renders every registration.
Verify
- Add all three hooks.
- Open an event with registrations and confirm the column renders in all three sections.
- Confirm empty values render a dash rather than an empty cell.
- Export to CSV and confirm the column and its values.
- Export to XLS and confirm the same.