How to add additional data to confirmation email
Last Updated: September 1, 2023
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?
Event Tickets Addon Buy Now
- Event Tickets
- Auto Complete Ticket Order
- Auto re-stocking refunded, cancelled or failed orders
- Changelog for Event Tickets
- CODE: How to send Emails as Bcc
- How to add additional data to confirmation email
- How to add additional fields at checkout
- How to add additional fields to download attendees CSV file
- How to customize ticket email template
- How to manage capacity separately for repeat events
- How to set up Event Tickets
- How to set up variable prices for Tickets
- How To Switch From WooCommerce Blocks to Shortcode-Based Cart & Checkout Pages