Created
January 22, 2018 16:48
-
-
Save barryhughes/f7a7b98c374e1c2ba5bb12c922d91264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
### Example of adding an extra column to the Event Tickets/Event Tickets Plus | |
### attendee table. | |
### | |
### Tested with Event Tickets Plus 4.6.2 | |
# Register our extra column | |
add_filter( 'tribe_tickets_attendee_table_columns', function( $columns ) { | |
$columns['extra'] = 'My extra column'; | |
return $columns; | |
} ); | |
# Populate the extra column ($item can be used to identify the actual attendee object) | |
add_filter( 'tribe_events_tickets_attendees_table_column', function( $val, $item, $column ) { | |
static $count = 0; | |
if ( 'extra' === $column ) { | |
$val = 'Extra column value ' . ++$count; | |
} | |
return $val; | |
}, 10, 3 ); |
Thanks for the note (happy to hear this still works some 4 years later)!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank's a lot!!!! Super helpfull 👏👏👏