Created
August 5, 2020 20:36
-
-
Save rafsuntaskin/5d2b988f38d99b3dde166199cf9bb4dd to your computer and use it in GitHub Desktop.
Adding Ticket/RSVP description in Ticket Email for Event Tickets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Ticket Description in the Ticket Email | |
*/ | |
add_action( 'tribe_tickets_ticket_email_after_details', 'rt_render_ticket_desc_in_email', 10, 2 ); | |
function rt_render_ticket_desc_in_email( $ticket, $event ) { | |
$ticket_provider = Tribe__Tickets__Tickets::get_ticket_provider_instance( $ticket['provider'] ); | |
$ticket_obj = $ticket_provider->get_ticket( $event, $ticket['product_id'] ); | |
?> | |
<table class="" border="0" cellpadding="0" cellspacing="0" width="100%"> | |
<tr> | |
<td valign="top" align="left" width="100%" style="height:30px; background:#f7f7f7; padding: 0 !important; margin:0 !important;"> | |
<div> <?php echo $ticket_obj->description; ?> </div> | |
</td> | |
</tr> | |
</table> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment