Action since v1.3.0
fswa_webhook_saved
Fires after a webhook is created or updated via the REST API.
$
/ Signature
do_action( 'fswa_webhook_saved', $webhook_id, $webhook_data, $is_new )
/ When it fires
Fires after the webhook row is written to the database, inside the REST API handler for create and update operations. Extensions use this to persist their own per-webhook fields.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $webhook_id | param | int | yes | Webhook configuration ID. |
| $webhook_data | param | array | yes | The saved webhook data array. |
| $is_new | param | bool | yes | `true` if the webhook was just created; `false` on update. |
/ Examples
Log webhook changes to an audit log
add_action( 'fswa_webhook_saved', function ( $webhook_id, $webhook_data, $is_new ) { $action = $is_new ? 'created' : 'updated'; $name = $webhook_data['name'] ?? "#{$webhook_id}"; error_log( "[fswa] Webhook {$name} {$action} (ID: {$webhook_id})" ); }, 10, 3 );
/ Related
Ready Your next automation is
Your next automation is
one sentence away.
$ wp plugin install flowsystems-webhook-actions --activate