Title: wp_die_json_handler
Published: February 22, 2019
Last modified: May 20, 2026

---

# apply_filters( ‘wp_die_json_handler’, callable $callback )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_die_json_handler/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_die_json_handler/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_die_json_handler/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_die_json_handler/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_die_json_handler/?output_format=md#wp--skip-link--target)

Filters the callback for killing WordPress execution for JSON requests.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_die_json_handler/?output_format=md#parameters)󠁿

 `$callback`callable

Callback function name.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_die_json_handler/?output_format=md#source)󠁿

    ```php
    $callback = apply_filters( 'wp_die_json_handler', '_json_wp_die_handler' );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/functions.php#L3808)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/functions.php#L3808-L3808)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_die_json_handler/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_die()](https://developer.wordpress.org/reference/functions/wp_die/)`wp-includes/functions.php` |

Kills WordPress execution and displays HTML page with an error message.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_die_json_handler/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.1.0](https://developer.wordpress.org/reference/since/5.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_die_json_handler%2F)
before being able to contribute a note or feedback.