JacquesMivi
September 25, 2017 at 7:04 am
Hi there,
Do you have snippets to add/edit extra meta data on ticket table ?
Thanks a lot,
JacquesMivi
September 25, 2017 at 7:20 am
Add New Note to this Reply
I have try to follow this post but without success
https://eventespresso.com/topic/adding-a-custom-field-in-event-tickets-datetimes/
Here is my code
//This is used to display the value of the SKU
add_filter( 'FHEE__espresso_events_Pricing_Hooks___get_ticket_row__template_args', 'es_display_tkt_SKU', 10, 7 );
function es_display_tkt_SKU( $template_args, $tktrow, $ticket, $ticket_datetimes, $all_dtts, $default, $all_tickets ) {
$TKT_ID = $template_args[ 'TKT_ID' ];
$ticket = EEM_Ticket::instance()->get_one_by_ID( $TKT_ID );
if ( $ticket instanceof EE_Ticket ) {
$template_args[ 'TKT_SKU' ] = "12";
}
return $template_args;
}
Tony
September 26, 2017 at 1:53 am
Add New Note to this Reply
That would add a TKT_SKU value to $template_args
but you’d need to use that somewhere, EE will not output it automatically.
Another user has previously created ‘Admin Only’ tickets using ticket meta which may give you an idea on how to do this, take a look:
https://github.com/chasecmiller/EE4-AdminOnlyTicket
Does that help?
JacquesMivi
September 28, 2017 at 8:14 am
Add New Note to this Reply
Ok I will dig into this code.
Thanks