Action Pro since v1.7.0
fswa_glue_post_dispatch
Fires after a successful (2xx) delivery with the full response and both pre/post-mapping payloads.
$
/ Signature
do_action( 'fswa_glue_post_dispatch', $webhook_id, $trigger, $response_code, $response_body, $payload, $webhook, $original_payload )
/ When it fires
Fires only on 2xx responses, after `fswa_webhook_response`. Pro's post-dispatch snippets run at priority 10. Webhook chain dispatch runs at priority 20 — custom hooks at priority < 20 run before chained webhooks fire.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $webhook_id | param | int | yes | Webhook configuration ID. |
| $trigger | param | string | yes | WordPress action name. |
| $response_code | param | int | yes | HTTP response status code (always 2xx here). |
| $response_body | param | string | yes | Raw HTTP response body. |
| $payload | param | array | yes | The mapped payload that was sent (post-mapping, post-Code Glue). |
| $webhook | param | array | yes | Full webhook configuration row. |
| $original_payload | param | array|null | — | Pre-mapping payload, or `null` if no mapping was applied. |
/ Examples
Write a returned external ID back to WordPress meta
add_action( 'fswa_glue_post_dispatch', function ( $webhook_id, $trigger, $code, $body, $payload, $webhook, $original ) { if ( $webhook_id !== 42 ) return; $data = json_decode( $body, true ); if ( ! isset( $data['id'] ) ) return; $post_id = $original['order_id'] ?? $payload['order_id'] ?? 0; if ( $post_id ) { update_post_meta( (int) $post_id, '_external_id', sanitize_text_field( $data['id'] ) ); } }, 10, 7 );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate