Webhook filters (apply to all configured form webhooks?)

I need to modify the headers for a webhook request (to include auth token).

I understand that the ’ gform_webhooks_request_headers’ filter exists. BUT I don’t want this filter run for EVERY webhook configured on a form… just one specific webhook that requires the relevant header/token.

My question is: does the ‘gform_webhooks_request_headers’ filter get executed for ALL configured webhooks on the form, or can you specify a single configured webhook to be affected by this filter? If not, should I default to use ‘gform_after_submission’ action (gform_after_submission - Gravity Forms Documentation)?

Thanks in advance!

The filter gform_webhooks_request_headers will run on every form and feed. If you would like to hook into a specific form, you can append the form ID to the filter as outlined in the documentation. After doing so, since the Feed Object is passed into your function, you can check against the $feed['id'] property in order to target a specific feed. The feed ID can be found by looking to the fid parameter in the URL when editing the feed.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.