Created
September 9, 2020 19:19
-
-
Save kodie/b9c00a65bbd52c5790d5bcea3ba62c5c to your computer and use it in GitHub Desktop.
Stops any emails from sending and instead prints the email message out on the page in WordPress
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
<?php | |
// Stops any emails from sending and instead prints the email message out on the page | |
add_filter('wp_mail', 'preview_emails', 1, 99); | |
function preview_emails($args) { | |
echo $args['message']; | |
die(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment