Filter since v1.9.0
fswa_capture_payload
Filters the payload stored as the example capture — does not affect what is dispatched.
$
/ Signature
apply_filters( 'fswa_capture_payload', $payload, $webhook_id, $trigger )
/ When it fires
Fires when storing an example payload for use in the field selector and payload mapping UI.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $payload | param | array | yes | Payload to be stored as the captured example. |
| $webhook_id | param | int | yes | Webhook configuration ID. |
| $trigger | param | string | yes | WordPress action name. |
/ Returns
array Modified capture payload. Does not affect the dispatched payload./ Examples
Strip sensitive data from stored captures
add_filter( 'fswa_capture_payload', function ( $payload, $webhook_id, $trigger ) { unset( $payload['args'][0]['billing_email'] ); unset( $payload['args'][0]['billing_phone'] ); return $payload; }, 10, 3 );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate