Celebrate WordCamp USA with 30% OFF! Use coupon WC30 at checkout - Full terms

wsf_action_webhook_payloadPRO

Description

The wsf_action_webhook_payload filter hook allows you to change the payload sent with the Webhook action.

Usage

add_filter( 'wsf_action_webhook_payload', 'my_hook_function', 10, 4 );

Parameters

  1. $payload Array
    The payload to be sent in the HTTP request.
  2. $form Form Object
    The form object.
  3. $submit Submit Object
    The submit object.
  4. $action Array
    The action configuration.

Example

// Callback function for the wsf_action_webhook_payload filter hook
function my_hook_function( $payload, $form, $submit, $action ) {
	
	// Your code here ...

	// Return value
	return $payload;
}

// Add a callback function for the wsf_action_webhook_payload filter hook
add_filter( 'wsf_action_webhook_payload', 'my_hook_function', 10, 4 );

Source File

This hook can be found in: <plugin root>/includes/actions/class-ws-form-action-custom-api.php