Created
August 19, 2023 21:46
-
-
Save chrisegg/e226214256a7df11cc407355cc8f6205 to your computer and use it in GitHub Desktop.
Use this to change the {admin_email} for all Gravity Forms Admin Notifications
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 | |
//copy everything below this line | |
add_filter( 'gform_notification', 'change_notification_email', 10, 3 ); | |
function change_notification_email( $notification, $form, $entry ) { | |
if ( $notification['name'] == 'Admin Notification' ) { | |
// toType can be routing or email | |
$notification['toType'] = 'email'; | |
$notification['to'] = 'email@example.com'; //put your TO email address here | |
$notification['from'] = 'email@example.com'; //put your FROM email address here | |
} | |
return $notification; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment