Filter since v1.1.0
fswa_max_attempts
Sets the maximum number of delivery attempts before a webhook is marked permanently failed.
$
/ Signature
apply_filters( 'fswa_max_attempts', $attempts, $webhook_id )
/ When it fires
Fires when a new queue job is created and before each retry to determine if more attempts remain.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $attempts | param | int | yes | Max attempts. Default: `5`. Test webhooks always get 1. |
| $webhook_id | param | int | yes | Webhook configuration ID. |
/ Returns
int Maximum number of attempts. Minimum: 1./ Examples
Give critical webhooks more attempts
add_filter( 'fswa_max_attempts', function ( $attempts, $webhook_id ) { $critical = [ 12, 17 ]; // webhook IDs return in_array( $webhook_id, $critical, true ) ? 10 : $attempts; }, 10, 2 );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate