Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Created June 15, 2015 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseeproductions/7ec5827ffa34a3995dc9 to your computer and use it in GitHub Desktop.
Save jesseeproductions/7ec5827ffa34a3995dc9 to your computer and use it in GitHub Desktop.
The Events Calendar WooCommerce Tickets - Prevent Ticket Email from being sent
/*
* The Events Calendar WooCommerce Tickets - Prevent Ticket Email from being sent.
* @ Version 3.10
*/
add_action( 'init', 'wootickets_stop_sending_email' );
function wootickets_stop_sending_email() {
if (class_exists('Tribe__Events__Tickets__Woo__Main')) {
$woo = Tribe__Events__Tickets__Woo__Main::get_instance();
remove_filter( 'woocommerce_email_classes', array( $woo, 'add_email_class_to_woocommerce' ) );
add_action( 'woocommerce_email_after_order_table', array( $woo, 'add_tickets_msg_to_email' ) );
}
}
/*
* The Events Calendar WooCommerce Tickets - Hide You'll receive your tickets in another email.
* @ Version 3.10
*/
add_filter('wootickets_email_message', 'woo_tickets_filter_completed_order', 10 );
function woo_tickets_filter_completed_order($text) {
$text = "";
return $text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment