Skip to content

Instantly share code, notes, and snippets.

@nandomoreirame
Last active March 14, 2018 20:28
Show Gist options
  • Select an option

  • Save nandomoreirame/599efb41d7dda5a6d9cbb84b96345800 to your computer and use it in GitHub Desktop.

Select an option

Save nandomoreirame/599efb41d7dda5a6d9cbb84b96345800 to your computer and use it in GitHub Desktop.
show wp_mail() errors
<?php
/*
* show wp_mail() errors
*/
add_action( 'wp_mail_failed', 'onMailError', 10, 1 );
function onMailError( $wp_error ) {
echo '<pre>' . print_r($wp_error , true ) . '</pre>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment