Hi Stephen
I’m trying to amend the bookings admin table columns with the following code:
function banana__wpe_booking_columns($columns) {
unset($columns['booking_price']);
$columns['test1'] = "Test1";
$columns['test2'] = "Test2";
return $columns;
}
add_filter('manage_event_page_bookings_columns', 'banana__wpe_booking_columns');
This doesn’t work and I think it may be to do with the screen->id because if I use this on posts, it works:
add_filter('manage_posts_columns', 'banana__wpe_booking_columns');
I did have the Modern Tribe Events Calendar plugin installed (now removed) but I know that creates an event post type. I don’t know if that might be an issue.
Thanks

David McCourt
You’ll need to use a later priority:
add_filter('manage_event_page_bookings_columns', 'banana__wpe_booking_columns', 15 );
(I’d forgotten that when I provided the snippet).

Stephen Harris
Appreciate the quick response. Thanks Stephen, that works.
Final question: how to get the booking form additional fields? I can’t get any of these to work:
$org = get_post_meta($item->ID, 'organisation');
or
$org = eo_get_booking_meta($item->ID, 'organisation');
or
$event_id = eo_get_booking_meta($item->ID, 'event_id');
$org = get_post_meta($event_id, 'organisation');
or
$event_id = eo_get_booking_meta($item->ID, 'event_id');
$org = eo_get_booking_meta($event_id, 'organisation');
Thanks!

David McCourt
Hi David,
Each field added to the form as an ID, you can get the associated data via:
$value = eo_get_booking_meta( $booking_id, $element_id, true );

Stephen Harris
Hmm. Can’t get this to return anything. I can see the data in the postmeta table but an empty string is returned. The element ID is just the number?
$org = eo_get_booking_meta($item->ID, 4, true);
$item->ID is the same as the booking_id

David McCourt
That’s correct.
My previous response was incorrect, the key is meta_4
(for an element of ID 4)

Stephen Harris