Skip to content

Instantly share code, notes, and snippets.

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 taricco/a8d6efb313621b9b26766a46ea08adeb to your computer and use it in GitHub Desktop.
Save taricco/a8d6efb313621b9b26766a46ea08adeb to your computer and use it in GitHub Desktop.
/* Place in functions.php - Notification name must match */
add_filter('gform_notification', 'change_notification_format', 10, 3);
function change_notification_format($notification, $form, $entry)
{
GFCommon::log_debug('gform_notification: change_notification_format() running.');
// Do the thing only for a notification with the name Text Notification
if ($notification['name'] == 'Admin Notification') {
GFCommon::log_debug('gform_notification: format changed to text.');
// Change notification format to text from the default html
$notification['message_format'] = 'text';
}
return $notification;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment