Automattic\WooCommerce\Internal\PushNotifications\Controllers

StepLogRestController::get_token │ protected │ WC 11.3.0

Handles the device request.

Method of the class: StepLogRestController{}

No Hooks.

Returns

WP_REST_Response.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_token( $request ): WP_REST_Response;
$request(WP_REST_Request) (required)
The request object.

Changelog

Since 11.3.0 Introduced.

StepLogRestController::get_token() code WC 11.3.0

protected function get_token( WP_REST_Request $request ): WP_REST_Response {
	list( $from, $to ) = $this->get_range( $request );

	return new WP_REST_Response( $this->query->for_token( (int) $request->get_param( 'token_id' ), $from, $to, $this->get_limit( $request ) ) );
}