Created
March 1, 2014 20:21
-
-
Save meloniq/9296597 to your computer and use it in GitHub Desktop.
Preventing WordPress from Sending emails
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
function childtheme_no_emails( &$phpmailer ) { | |
// Empty out the values that may be set | |
$phpmailer->ClearAllRecipients(); | |
$phpmailer->ClearAttachments(); | |
$phpmailer->ClearCustomHeaders(); | |
$phpmailer->ClearReplyTos(); | |
} | |
add_action( 'phpmailer_init', 'childtheme_no_emails', 99, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment