Skip to content

Instantly share code, notes, and snippets.

Created November 20, 2018 01:09
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Selectively Send Gravity Forms Notifications in Plain Text
// Send Gravity Form notifications in plain text when Notification is called `Plain Text Notification`
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 `Plain Text Notification`
if ( $notification['name'] == 'Plain Text 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