Filter since v1.0.0
fswa_available_triggers
Filters the grouped list of available triggers returned by the triggers REST endpoint.
$
/ Signature
apply_filters( 'fswa_available_triggers', $triggers )
/ When it fires
Fires when the REST API returns the available triggers list (used to populate the trigger picker in the admin UI).
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $triggers | param | array | yes | Grouped triggers: `[ category => [ hookName, ... ] ]`. |
/ Returns
array Modified triggers array. Same structure./ Examples
Add a custom plugin hook to the trigger list
add_filter( 'fswa_available_triggers', function ( $triggers ) { $triggers['My Plugin'][] = 'my_plugin_order_confirmed'; $triggers['My Plugin'][] = 'my_plugin_subscription_renewed'; return $triggers; } );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate