Action since v2.4.0
fswa_import_trigger
Restore per-trigger data after a webhook is recreated from a Build import.
$
/ Signature
do_action( 'fswa_import_trigger', $webhook_id, $trigger_name, $trigger )
/ When it fires
Fires once per trigger while importing a webhook, after its schema (field mapping + conditions) has been written. Pro listens here to recreate the pre/post Code Glue snippets carried in the trigger’s code_glue block.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $webhook_id | param | int | yes | The freshly created webhook ID. |
| $trigger_name | param | string | yes | The trigger (WordPress action) name. |
| $trigger | param | array | yes | The trigger document from the import (name, schema, and any extra blocks such as `code_glue`). |
/ Examples
Log which triggers were restored on import
add_action( 'fswa_import_trigger', function ( $webhook_id, $trigger_name, $trigger ) { error_log( sprintf( '[fswa] imported %s onto webhook #%d', $trigger_name, $webhook_id ) ); }, 10, 3 );
/ Related
Ready Your next automation is
Your next automation is
one sentence away.
$ wp plugin install flowsystems-webhook-actions --activate