Skip to content

Commit

Permalink
Update gpns-trigger-function-by-scheduled-notification.php
Browse files Browse the repository at this point in the history
Fixed PHPCS issues.
  • Loading branch information
spivurno authored Mar 31, 2022
1 parent f08ccad commit 9f296db
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Gravity Perks // Notification Scheduler // Trigger Function on Send
* https://gravitywiz.com/documentation/gravity-forms-notification-scheduler/
*
* This snippet demonstrates how to trigger a custom function using a scheduled notification. The notification
* is suppressed by default but can also be triggered by removing the specified line below. The trigger
* This snippet demonstrates how to trigger a custom function using a scheduled notification. The notification
* is suppressed by default but can also be triggered by removing the specified line below. The trigger
* notification is identified by its subject line.
*/
add_filter( 'gform_pre_send_email', function( $email, $message_format, $notification, $entry ) {
Expand All @@ -14,15 +14,15 @@
return $email;
}

// Update "Trigger: My Custom Function" to your trigger notification's subject line.
// Update "Trigger: My Custom Function" to your trigger notification's subject line.
if ( $notification['subject'] !== 'Trigger: My Custom Function' ) {
return $email;
}

// Delete this line if you want the notification to still be sent.
// Delete this line if you want the notification to still be sent.
$email['abort_email'] = true;

// Update this to your own custom function name.
// Update this to your own custom function name.
my_custom_function();

return $email;
Expand Down

0 comments on commit 9f296db

Please sign in to comment.