WordPress does that by default at the end of admin-ajax.php
. It kind of assumes you’ll use one of wp_send_json()
, wp_send_json_success()
, or wp_send_json_error()
to communicate your process’ state (or at least terminate the script yourself). All of those use wp_die()
to terminate the script after sending the response. It’s sort of a catch-all response.