gform_webhooks_request_method

gform_webhooks_request_method

DescriptionUsageParametersExamplePlacementSource Code

Description
This filter allows the webhook HTTP request method to be modified.
Usage
The following would apply to all forms:
add_filter( 'gform_webhooks_request_method', 'your_function_name', 10, 4 )

To target a specific form, append the form id to the hook name. (format: gform_webhooks_request_method_FORMID)
add_filter( 'gform_webhooks_request_method_7', 'your_function_name', 10, 4 )

Parameters

$request_method string
HTTP request method.

$feed Feed Object
The current feed object.

$entry Entry Object
The current entry object.

$form Form Object
The current form object.

Example
add_filter( 'gform_webhooks_request_method', 'set_method', 10, 4 );
function set_method( $request_method, $feed, $entry, $form ){
return 'GET';
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GF_Webhooks::process_feed() in gravityformswebhooks/class-gf-webhooks.php.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註