Event Tickets Addon Buy Now
Other Documentations
Auto Complete Ticket OrderAuto re-stocking refunded, cancelled or failed ordersChangelog for Event TicketsCODE: How to send Emails as BccHow to add additional data to confirmation emailHow to add additional fields at checkoutHow to add additional fields to download attendees CSV fileHow to customize ticket email templateHow to manage capacity separately for repeat eventsHow to set up Event TicketsHow to set up variable prices for TicketsHow To Switch From WooCommerce Blocks to Shortcode-Based Cart & Checkout Pages
How to add additional data to confirmation email
September 1, 2023
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
class custom_code{ public function __construct(){ add_action('evotix_confirmation_email_data_after_tr', array($this,'tix_confirmation'), 10, 4); } public function tix_confirmation($EVENT, $TIX_CPT, $order, $styles){ // get the new values $new_value = 'new value'; ?> <tr><td colspan='3' style='border-top:1px solid #e0e0e0; padding:8px 20px; text-transform: none'> <div style='font-size: 14px;font-style: italic;font-family: "open sans",helvetica; padding: 0px; margin: 0px;font-weight: bold;line-height: 100%;word-break:break-word'> <?php echo $new_value;?> </div> <p style="<?php echo $styles['004'];?>"><?php echo 'Additional Information';?></p> </td></tr> <?php } } // initiate the class new custom_code(); |
This code can be placed in functions.php file or as a separate plugin file.
This code will add any additional values to Ticket confirmation email. You can use passed on parameters such as $EVENT, $TIX_CPT, $order, $styles to grab new values from those objects.
Did this article help you? If not, send us a ticket via helpdesk