Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Change the destination address of the email.
- *
- * @param array $email;
- * @return array
- */
- function change_notification_addr(array $email) {
- $email['to'] = 'desired@address.com';
- return $email;
- }
- /**
- * Sets up a filter to alter the behaviour of wp_mail.
- */
- function intercept_mail() {
- add_filter('wp_mail', 'change_notification_addr', 100);
- }
- /**
- * Intervene at the point where an order notification is
- * going to be sent to the site administrator.
- */
- add_action('txo_notification_email', 'intercept_mail', 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement