Action since v1.9.0
fswa_webhook_response
Fires after every HTTP response is received — success or error — with full response context.
$
/ Signature
do_action( 'fswa_webhook_response', $webhook_id, $trigger, $response_code, $response_body, $payload, $webhook )
/ When it fires
Fires after every HTTP response, for both 2xx successes and error codes. Fires on the first synchronous attempt and on every queue retry.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $webhook_id | param | int | yes | Webhook configuration ID. |
| $trigger | param | string | yes | WordPress action name. |
| $response_code | param | int | yes | HTTP response status code. |
| $response_body | param | string | yes | Raw HTTP response body. |
| $payload | param | array | yes | The final payload that was sent. |
| $webhook | param | array | yes | Full webhook configuration row. |
/ Examples
Store a returned HubSpot deal ID in post meta
add_action( 'fswa_webhook_response', function ( $webhook_id, $trigger, $code, $body, $payload, $webhook ) { if ( $code !== 201 ) return; $data = json_decode( $body, true ); if ( isset( $data['id'], $payload['order_id'] ) ) { update_post_meta( (int) $payload['order_id'], '_hs_deal_id', sanitize_text_field( $data['id'] ) ); } }, 10, 6 );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate