Winter Solstice sale! 30% Off code: SOLSTICE24 Shop Now

ends midnight 12/21 PST

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?

Ready to setup your calendar?