WordPress filter hook · part of WordPress core
rest_post_dispatch
A WordPress core filter that 14 plugins also fire themselves, running on 94K+ sites between them.
“This filter is documented in wp-includes/rest-api/class-wp-rest-server.php”
How to use rest_post_dispatch
It's a filter: your callback receives the value and 2 more arguments, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'rest_post_dispatch', function( $do_request, $server, $request ) {
// Change $do_request here.
return $do_request;
}, 10, 3 );Argument names come from Easy MCP AI's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
14 plugins that fire rest_post_dispatch
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Uncanny Automator40,000+ installs
apply_filters( 'rest_post_dispatch', rest_ensure_response( $response ), rest_get_server(), $request )src/app/Recipe_Builder/Shared/Content/Utilities/Post_Content_Request_Scope.php:48 -
Easy MCP AI40,000+ installs
apply_filters( 'rest_post_dispatch', rest_do_request( $request ), rest_get_server(), $request )includes/tools/class-base-tool.php:560 -
SupportCandy10,000+ installs
apply_filters( 'rest_post_dispatch', rest_ensure_response( rest_do_request( $request ) ), rest_get_server(), $request )includes/admin/ai-assistant/admin/class-wpsc-ps-ai-functions.php:935 -
OpenStation1,000+ installs
apply_filters( 'rest_post_dispatch', rest_ensure_response( $response ), $server, $request )includes/framework/wordpress.php:674 -
Customize Posts1,000+ installs
apply_filters( 'rest_post_dispatch', rest_ensure_response( $rest_response ), $wp_rest_server, $request )php/class-wp-customize-posts-preview.php:1540 -
Funnelforms Free1,000+ installs
apply_filters( 'rest_post_dispatch', $response, $server, $request )src/Http/FormBridge.php:129 -
Groundhogg1,000+ installs
apply_filters( 'rest_post_dispatch', rest_do_request( $request ), rest_get_server(), $request )includes/mcp/connection.php:509 -
MarketPowerWP10+ installs
apply_filters( 'rest_post_dispatch', rest_ensure_response($result), $wp_rest_server, $request )src/LePlugin/Api/ApiCall.php:48 -
CliedeskFewer than 10 installs
apply_filters( 'rest_post_dispatch', rest_ensure_response( rest_do_request( $sub ) ), rest_get_server(), $sub )src/Rest/RestServer.php:503 -
MAIAFewer than 10 installs
apply_filters( 'rest_post_dispatch', $response, rest_get_server(), $request )src/Abilities/Rest/AbstractRestAbility.php:45 -
Loyalty Points, Rewards and Cashback for WooCommerceFewer than 10 installs
apply_filters( 'rest_post_dispatch', $response, $server, $request )scripts/test-storefront.php:478 -
Yozo AI Marketing AgentFewer than 10 installs
apply_filters( 'rest_post_dispatch', rest_ensure_response( $response ), $server, $inner )includes/class-yozo-widget-passthrough.php:160 -
Live Visitor AnalyticsFewer than 10 installs
apply_filters( 'rest_post_dispatch', rest_ensure_response( $result ), $server, $request )includes/class-pqanalytics-fast.php:187 -
ProzenceFewer than 10 installs
apply_filters( 'rest_post_dispatch', rest_ensure_response( $y ), $sunucu, $alt )inc/toplu.php:79
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.