WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp send json success

Description

Send a JSON response back to an Ajax request, indicating success.

Usage

<?php wp_send_json_success( $data ) ?>

Parameters

$data
(mixed) (optional) Data to encode as JSON, then print and die.
Default: null

Examples

Default Usage

Notes

Uses wp_send_json() to send response.

Change Log

Source File

wp_send_json_success() is located in wp-includes/functions.php

Related

wp_send_json(), wp_send_json_error()