Hi.We need to be able to view one of the fields from the booking form when looking at all bookings. Currently the parent (adult) makes the booking for their kids so when looking at all bookings under Events > Bookings – we can only see Bookee name and not the kid’s name (the one attending). How can we add an additional column in order to view the kid’s name which is input field on the booking form? Or is there a way to change what appears under the Bookee column which is the WP user to the custom field value instead?
Thanks
Jade W.
OK
I managed to add an extra column using
add_filter( ‘manage_event_page_bookings_columns’, function( $columns ) {
$columns[‘_player_name’] = ‘Player Name’;
return $columns;
}, 20 );
I’m confused how to pull booking form fields into the column? I have a input form field ID:23
Jade W.
Hi Jade,
You do the following:
add_filter('eventorganiser_booking_table_column', function($column, $booking){
if ($column === "_player_name") {
echo eo_get_booking_meta( $booking->ID, 'meta_23' );
}
}, 10, 2);
Stephen Harris
Hi Stephen
Doesn’t work. It’s not pulling value of field in at all
Is it echo or return?
Thanks
Jade
Jade W.
All good. Modified code a little and it works now. Thanks
Jade W.
Glad it’s working for you now. Was the problem with the code snippet I posted?
Stephen Harris
Hi Stephen. Doesn’t seem to work with return.
This works for me:
add_filter( 'eventorganiser_booking_table_column', function( $columns, $booking) {
if ( '_player' !== $column ) {`
$player_name = eo_get_booking_meta( $booking->ID, 'meta_25' );
}
echo "$player_name";
}, 10, 2);
I’ve just emailed you for help with automatically creating Mailpoet list when event is published. Thanks!
-
This reply was modified 4 years, 3 months ago by Jade W..
Jade W.