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

NameInTypeReqDescription
$triggerparamstringyesThe WordPress action name that triggered the delivery.
$urlparamstringyesThe endpoint URL the payload was sent to.
$payloadparamarrayyesThe final payload that was delivered.
$responseparamarrayyes`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.
Start logging them.

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