WP Webhooks / Docs / fswa_capture_payload
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

NameInTypeReqDescription
$payloadparamarrayyesPayload to be stored as the captured example.
$webhook_idparamintyesWebhook configuration ID.
$triggerparamstringyesWordPress 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.
Start logging them.

$ wp plugin install flowsystems-webhook-actions --activate