Action since v1.0.0
fswa_success
Fires after a webhook is delivered successfully (2xx response received).
$
/ Signature
do_action( 'fswa_success', $trigger, $url, $payload, $response )
/ When it fires
Fires once per successful delivery attempt, after a 2xx HTTP status is received and the log entry is written.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $trigger | param | string | yes | The WordPress action name that triggered the delivery. |
| $url | param | string | yes | The endpoint URL the payload was sent to. |
| $payload | param | array | yes | The final payload that was delivered. |
| $response | param | array | yes | `wp_remote_post()` response array (includes `response`, `headers`, `body`). |
/ Examples
Log successful deliveries to an external monitoring service
add_action( 'fswa_success', function ( $trigger, $url, $payload, $response ) { $code = wp_remote_retrieve_response_code( $response ); error_log( "[fswa] Delivered {$trigger} to {$url} — HTTP {$code}" ); }, 10, 4 );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate