When using the Event Tickets plugin, tickets are automatically emailed to your customers as soon as purchase is complete. The confirmation email includes the ticket details and is essential to the attendee experience. However, there may be scenarios where you want to turn off confirmation emails, especially if you’re handling ticket distribution differently.

The new Tickets Emails functionality provides a straightforward and easy way to enable, disable, or customize the emails sent by our ticketing plugins. While this feature offers essential flexibility, more advanced solutions are available for those requiring finer control. These solutions enable you to customize email behavior, such as disabling emails for specific providers or restricting them to certain events, giving you complete control over the timing and recipients of the emails.

WooCommerce

The following PHP code snippet disables the sending of ticket confirmation emails for tickets using WooCommerce as the payment platform,

/* Disable tickets emails for Woo */
add_filter( 'tribe_tickets_plus_email_enabled', '__return_false' );

It will not, however, affect the order emails WooCommerce sends.

Easy Digital Downloads

The following PHP code snippet helps disable email receipts for Easy Digital Downloads (EDD) orders,

/* Disable tickets emails for EDD */
add_filter( 'edd_email_ticket_receipt', '__return_false' );

Disable Ticket Emails for Certain Events

The following code snippet customizes how email notifications are handled in Event Tickets by preventing emails from being sent for specific events. It works by checking if the email is related to an event and whether the event ID matches any in a list of excluded event IDs (like 123, 124, or 125). If the event is on the list, the code stops the email from being sent by returning null.

This can be useful when you want to block email notifications for certain events, such as private gatherings or internal testing events.

Add the code snippet to the functions.php file of your theme, or use your preferred method for integrating snippets into your WordPress site, such as the free Code Snippets plugin.

For Developers