Created
November 2, 2018 09:00
-
-
Save torbentschechne/bfb2be3ab9bc36e6e2487966e149b707 to your computer and use it in GitHub Desktop.
Prevent e-Mails from being sent out
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