Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_xml_rest_api_response( $xml ) {
- $response = new WP_REST_Response( $xml );
- $response->set_status( 200 );
- $response->set_headers( array_merge(
- $response->get_headers(),
- array(
- 'Content-Type' => 'text/xml; charset=UTF-8'
- )
- ) );
- return $response;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement