WC_REST_Ping_V4_Controller::get_ping
Get ping response.
Method of the class: WC_REST_Ping_V4_Controller{}
No Hooks.
Returns
WP_Error|WP_REST_Response.
Usage
$WC_REST_Ping_V4_Controller = new WC_REST_Ping_V4_Controller(); $WC_REST_Ping_V4_Controller->get_ping( $request );
- $request(WP_REST_Request) (required)
- Request data.
Changelog
| Since 4.0.0 | Introduced. |
WC_REST_Ping_V4_Controller::get_ping() WC REST Ping V4 Controller::get ping code WC 10.3.6
public function get_ping( $request ) {
$data = array(
'message' => 'pong',
'version' => 'v4',
);
return rest_ensure_response( $data );
}