Automattic\WooCommerce\Internal\PushNotifications\Controllers

StepLogRestController::get_token │ protected │ WC 11.3.0

Handles the device request.

Метод класса: StepLogRestController{}

Хуков нет.

Возвращает

WP_REST_Response.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_token( $request ): WP_REST_Response;
$request(WP_REST_Request) (обязательный)
The request object.

Список изменений

С версии 11.3.0 Введена.

Код StepLogRestController::get_token() 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 ) ) );
}