Rest_Controller extends Base_Server implements Premium_Service, Registerable, Rest_Server
Registers the quick view REST routes.
Tags
Interfaces, Classes and Traits
- Premium_Service
- Registerable
- Rest_Server
Table of Contents
- REST_NAMESPACE = 'wc-quick-view-pro/v1'
- $routes : array<string|int, Route>
- __construct() : mixed
- get_namespace() : mixed
- get_routes() : mixed
- nonce_user_logged_out() : int
- Prevent WooCommerce overriding the user ID for logged out users as this breaks our nonce validation.
- register() : mixed
Constants
REST_NAMESPACE
public
mixed
REST_NAMESPACE
= 'wc-quick-view-pro/v1'
Properties
$routes
private
array<string|int, Route>
$routes
= []
The list of REST route objects handled by this server.
Methods
__construct()
public
__construct() : mixed
Return values
mixed —get_namespace()
public
get_namespace() : mixed
Return values
mixed —get_routes()
public
get_routes() : mixed
Return values
mixed —nonce_user_logged_out()
Prevent WooCommerce overriding the user ID for logged out users as this breaks our nonce validation.
public
nonce_user_logged_out(int $uid, string $action) : int
Parameters
- $uid : int
-
The user ID
- $action : string
-
The nonce action
Return values
int —The user ID when logged out
register()
public
register() : mixed