diff --git a/projects/plugins/jetpack/class.json-api-endpoints.php b/projects/plugins/jetpack/class.json-api-endpoints.php index cd8210e933c1a..bd3ec25fef303 100644 --- a/projects/plugins/jetpack/class.json-api-endpoints.php +++ b/projects/plugins/jetpack/class.json-api-endpoints.php @@ -2737,6 +2737,8 @@ public function rest_callback( WP_REST_Request $request ) { $response = WPCOM_JSON_API::serializable_error( $response ); } + $response = wp_json_encode( $response ); + if ( $request->get_param( 'http_envelope' ) ) { $response = wp_json_encode( WPCOM_JSON_API::wrap_http_envelope( $status_code, $response, 'application/json' ) ); }