Skip to content

Instantly share code, notes, and snippets.

@chrisegg
Created August 19, 2023 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisegg/e226214256a7df11cc407355cc8f6205 to your computer and use it in GitHub Desktop.
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
<?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