Created
July 7, 2020 19:08
-
-
Save taricco/a8d6efb313621b9b26766a46ea08adeb to your computer and use it in GitHub Desktop.
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
/* 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