Forked from jesseeproductions/tribe-tickets-plus-prevent-emails.php
Created
January 27, 2016 16:14
-
-
Save cliffordp/e54dbe6d62c404482f23 to your computer and use it in GitHub Desktop.
Events Tickets Plus - WooCommerce Tickets - Prevent Ticket Email from being sent.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Events Tickets Plus - WooCommerce Tickets - Prevent Ticket Email from being sent. | |
* @ Version 4.0 | |
*/ | |
add_action( 'init', 'wootickets_stop_sending_email' ); | |
function wootickets_stop_sending_email() { | |
if ( class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) { | |
$woo = Tribe__Tickets_Plus__Commerce__WooCommerce__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' ) ); | |
} | |
} | |
/* | |
* Events Tickets Plus - WooCommerce Tickets - Hide You'll receive your tickets in another email. | |
* @ Version 4.0 | |
*/ | |
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