wsf_api_submit_response_data

Description

The wsf_api_submit_response_data filter allows you to modify the response data sent to the browser after a form is submitted.

Usage

add_filter( 'wsf_api_submit_response_data', 'my_hook_function', 10, 2 );

Parameters

  1. $response Array
    The array returned by the API after the form post has completed.
  2. $submit Submit Object
    The submit object.

Example

// Callback function for the wsf_api_submit_response_data filter hook
function my_hook_function( $response, $submit ) {
	
	// Your code here ...

	// Return value
	return $response;
}

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

Source File

This hook can be found in: <plugin root>/api/class-ws-form-api-submit.php