The gform_notification_services filter allows you to add a new choice to the “Email Service” setting on the edit notification page in Gravity Forms.
Usage
To use the filter, add the following line to your code:
add_filter('gform_notification_services', 'your_function_name', 10, 2);
Parameters
- $services (array): An array of notification services.
- $form (Form Object): The current Form object.
More information
See Gravity Forms Docs: gform_notification_services
Examples
Add a new service
This example adds a new custom service to the “Email Service” setting:
add_filter('gform_notification_services', 'add_notification_service'); function add_notification_service($services) { $services['the_service_name'] = array( 'label' => esc_html__('Your Custom Service', 'gravityforms'), 'image' => 'http://someurl.com/image.svg' ); return $services; }
Place this code in the functions.php
file of your active theme.
Note: Additional code is necessary to handle having the service actually send the notification email since this hook only makes the choice available to the user for selection when configuring their notifications.