Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active April 23, 2021 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/edf43d0d7037a12e8260104a6abd454c to your computer and use it in GitHub Desktop.
Save Pebblo/edf43d0d7037a12e8260104a6abd454c to your computer and use it in GitHub Desktop.
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