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 | |
/** | |
* | |
* WARNING: this only checks if the email is being sent to the same email as admin_email option. | |
* If for some reason another email is sent to that same email address, but it's not meant as an "admin email" | |
* this filter will still add those additional emails, just something to keep in mind. | |
*/ | |
add_filter( 'wp_mail', 'my_custom_to_admin_emails' ); | |