---
id: gk-foundation-ajax-result
title: "Filter - gk/foundation/ajax/result"
sidebar_label: "gk/foundation/ajax/result"
tags:
  - "1.0.11"
---

# Filter: gk/foundation/ajax/result

Modifies Ajax call result. Listeners can transform the response, including converting a success to an error or vice versa. Receives the raw Exception or WP_Error when the route failed.

## Parameters

| Name | Type | Description |
|------|------|-------------|
| $result | `mixed\|\Exception\|\WP_Error` |  |
| $router | `string` |  |
| $route | `string` |  |
| $payload | `array` |  |

### Since

- 1.0.11

### Source

Defined in `WP/AjaxRouter.php` at line 163

