AJAX issue – Uncaught SyntaxError when processing Zip File

Try to clear the buffer before returning your AJAX response.

    public function request_handler() {

    $post = $_POST;
    $data = $post['data'];

    $this->zip_file();
    ob_clean();
    echo json_encode($data);

    die();
}