xxxxxxxxxx
add_action( 'rest_api_init', function () {
register_rest_route( '/api/v1', '/endpoint', array(
'methods' => 'GET',
'callback' => 'endpointCallBack',
) );
} );
function endpointCallBack(){
wp_send_json_success("hice" , 200);
}