Action since v1.7.0
fswa_skipped
Fires when a webhook is skipped because its conditions did not pass.
$
/ Signature
do_action( 'fswa_skipped', $trigger, $webhook_id, $reason )
/ When it fires
Fires after condition evaluation fails, before the log entry is written. The event is still logged with a `skipped` status.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $trigger | param | string | yes | WordPress action name. |
| $webhook_id | param | int | yes | Webhook configuration ID. |
| $reason | param | array|null | — | The failed condition rule, or `null` if the reason is unavailable. |
/ Examples
Count skipped events in a custom stats table
add_action( 'fswa_skipped', function ( $trigger, $webhook_id, $reason ) { global $wpdb; $wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->prefix}my_skip_stats (webhook_id, trigger_name, skipped_at) VALUES (%d, %s, NOW())", $webhook_id, $trigger ) ); }, 10, 3 );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate