---
title: "fswa_glue_post_dispatch — Action Hook"
description: "Fires after a successful (2xx) delivery with the full response and both pre/post-mapping payloads."
url: "https://wpwebhooks.org/docs/fswa-glue-post-dispatch/"
---

[WP Webhooks](https://wpwebhooks.org/) / [Docs](https://wpwebhooks.org/docs/) / fswa\_glue\_post\_dispatch

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

[fswa\_webhook\_response](https://wpwebhooks.org/docs/fswa-webhook-response/)[Post-Dispatch Scripting](https://wpwebhooks.org/docs/post-dispatch-scripting/)[Webhook Chains](https://wpwebhooks.org/docs/webhook-chains/)

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://wordpress.org/plugins/flowsystems-webhook-actions/) [See the Plugin →](https://wpwebhooks.org/wordpress-webhook-plugin/)

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

## Structured data

```json
{"@context":"https://schema.org","@type":"TechArticle","name":"fswa_glue_post_dispatch — Action Hook — Webhook Actions Docs","description":"Fires after a successful (2xx) delivery with the full response and both pre/post-mapping payloads.","url":"https://wpwebhooks.org/docs/fswa-glue-post-dispatch/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
