WP Webhooks / Docs / fswa_export_trigger
Filter since v2.4.0

fswa_export_trigger

Attach per-trigger data to a webhook trigger block during export.

$

/ Signature

apply_filters( 'fswa_export_trigger', $doc, $webhook_id, $trigger_name )

/ When it fires

Fires once per exported trigger. The plugin listens here to serialize the pre/post Code Glue snippets assigned to that webhook+trigger so they travel with the export.

/ Parameters

NameInTypeReqDescription
$docparamarrayyesThe trigger document: `name`, `schema` (`example_payload`, `field_mapping`, `conditions`, `conditions_evaluate_on`, `include_user_data`, `use_shared_example`, or `null`) and `code_glue` (`null` until a listener fills it).
$webhook_idparamintyesThe webhook being exported.
$trigger_nameparamstringyesThe trigger (WordPress action) name.

/ Returns

array The trigger document, optionally enriched (the plugin itself adds a `code_glue` block).

/ Examples

The code_glue block attached per trigger

{
  "name": "wpcf7_mail_sent",
  "schema": {
    "example_payload": { "...": "..." },
    "field_mapping": {},
    "conditions": null,
    "conditions_evaluate_on": "original",
    "include_user_data": false,
    "use_shared_example": true
  },
  "code_glue": {
    "pre": { "name": "Enrich", "tags": [], "code": "...", "enabled": true },
    "post": null
  }
}

/ Related

Ready

Your next automation is
one sentence away.

$ wp plugin install flowsystems-webhook-actions --activate