Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
Last active January 8, 2021 16:39
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 andrasguseo/c4d8cf977ece6d5dc94226921b0486b7 to your computer and use it in GitHub Desktop.
Save andrasguseo/c4d8cf977ece6d5dc94226921b0486b7 to your computer and use it in GitHub Desktop.
Adding content to ticket emails
<?php
/* Adds conttent to the top of the email */
add_action( 'tribe_tickets_ticket_email_top', 'my_email_top_content' );
function my_email_top_content() {
echo "My custom content";
}
/* Adds conttent at the top of each ticket */
/**
* Gives an opportunity to manipulate the current ticket before output
*
* @since 4.7.4
*
* @param array $ticket Current ticket information
*/
add_action( 'tribe_tickets_ticket_email_ticket_top', 'my_email_ticket_top_content' );
function my_email_ticket_top_content( $ticket ) {
echo "My custom content";
}
/* Adds conttent after each ticket details */
/**
* Allows inserting content after the "ticket details" section.
*
* @since 4.12.3
*
* @param array $ticket Ticket information.
* @param WP_Post $event Event post object.
*/
add_action( 'tribe_tickets_ticket_email_after_details', 'my_email_after_ticket_details_content', 10, 2 );
function my_email_after_ticket_details_content( $ticket, $event ) {
echo "My custom content";
}
/* Adds conttent at the bottom of each ticket */
/**
* @param array $ticket Current ticket information
*/
add_action( 'tribe_tickets_ticket_email_ticket_bottom', 'my_email_bottom_content' );
function my_email_bottom_content( $ticket ) {
echo "My custom content";
}
/* Adds conttent at the bottom of the email */
add_action( 'tribe_tickets_ticket_email_bottom', 'my_email_bottom_content' );
function my_email_bottom_content() {
echo "My custom content";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment