Rest_Controller extends Base_Server implements Premium_Service, Registerable, Rest_Server

Registers the quick view REST routes.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

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

Properties

$routes

private array<string|int, Route> $routes = []

The list of REST route objects handled by this server.

Methods

get_namespace()

public get_namespace() : 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

Search results