Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Function to change email sender
- function new_sender_email( $original_email_address ) {
- return 'hello@custom.com';
- }
- // Function to change sender name
- function new_sender_name( $original_email_from ) {
- return 'Custom Name';
- }
- // Hooking up our functions to WordPress filters
- add_filter( 'wp_mail_from', __NAMESPACE__ . '\\new_sender_email' );
- add_filter( 'wp_mail_from_name', __NAMESPACE__ . '\\new_sender_name' );
- ?>
Add Comment
Please, Sign In to add comment