Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of how to add the [ESPRESSO_EVENT_ATTENDEE ticket_id={current_tkt_id}] output to every ticket description show in the ticket selector.
<?php //Please do not include the opening PHP tag if you already have one.
add_action('AHEE__ticket_selector_chart_template__ticket_details__after_description', 'tw_ee_add_event_attendees_to_tkt_description', 10, 3);
function tw_ee_add_event_attendees_to_tkt_description( $ticket, $ticket_price, $display_ticket_price ) {
echo do_shortcode('[ESPRESSO_EVENT_ATTENDEES ticket_id=' . $ticket->ID() . ']');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment