Custom endpoint that returns an xml
By default, the output returned by your endpoint/callback will always be sent as a JSON-encoded string (and the Content-Type header would also be/contain application/json), so you can’t use that callback for sending an XML feed. However, you can use the rest_pre_serve_request hook if you want your REST API route to serve a different type of … Read more