| CARVIEW |
Select Language
HTTP/2 301
date: Mon, 29 Dec 2025 11:47:33 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_pre_process_async_notifications/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: MISS
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=U6hLhwn3bCl0kumN7nh%2BpLDLeiVOJSo45Br35g23qb%2Bu6wtZazamwJozvVvxVYkJBn3jWhRa4BHbPHJPVnpKnkOGwHlPUQIYyJzrFHEh49eYKAuS"}]}
cf-ray: 9b5910312e0f9dfd-BLR
HTTP/2 200
date: Mon, 29 Dec 2025 11:47:34 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=9I%2FSmWcCUe2S%2Fcn36ZNEKM0hr%2B6yztnWlAWuvD%2FfOuA%2BxQawQc%2Bw0kDr1cMTY8oS6XIicp3TrdXA4Rk0nbU5W6eFjtAVnLCyCfDhXrGpC5RJ2dNx"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b5910376d529dfd-BLR
Gform Pre Process Async Notifications
gform_pre_process_async_notifications
Description
The gform_pre_process_async_notifications action hook can be used to perform custom actions just before the background processor sends queued notifications.
Usage
The action hook which runs for notifications sent in the background would be used like so:
add_action( 'gform_pre_process_async_notifications', 'your_function_name', 10, 5 );
Parameters
- $event string
The event the notifications are to be sent for. Default isform_submission. - $notifications array
An array containing the IDs of the notifications to be sent. - $form Form Object
The form currently being processed. - $entry Entry Object
The entry currently being processed. - $data array
An array of data which can be used in the notifications via the generic {object:property} merge tag. Defaults to empty array.
Example
add_action( 'gform_pre_process_async_notifications', function( $event, $notifications, $form, $entry, $data ) {
// Do something before the notifications are sent in the background.
} );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Since
This action hook was added in Gravity Forms v2.7.1
Source Code
This action hook is located in \Gravity_Forms\Gravity_Forms\Async\GF_Notifications_Processor::task() in /includes/async/class-gf-notifications-processor.php.