Filter since v1.3.0
fswa_webhook_data
Filters webhook data before it is returned in REST API responses.
$
/ Signature
apply_filters( 'fswa_webhook_data', $data, $webhook_id )
/ When it fires
Fires when a webhook is fetched via the REST API (single webhook or list endpoint).
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $data | param | array | yes | Serialized webhook data array returned by the REST endpoint. |
| $webhook_id | param | int | yes | Webhook configuration ID. |
/ Returns
array Modified webhook data. Pro uses this to append per-webhook retry/backoff fields./ Examples
Append a custom computed field to webhook responses
add_filter( 'fswa_webhook_data', function ( $data, $webhook_id ) { $data['delivery_count'] = (int) get_option( "my_webhook_{$webhook_id}_count", 0 ); return $data; }, 10, 2 );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate