WooCommerce Code Reference

Search results

WC_Auth

Auth class.

Table of Contents

VERSION Version. 1
__construct() Setup class. mixed
add_query_vars() Add query vars. string[]
add_endpoint() Add auth endpoint. mixed
get_i18n_scope() Get scope name. string
get_permissions_in_scope() Return a list of permissions a scope allows. array
build_url() Build auth urls. string
get_formatted_url() Decode and format a URL. string
make_validation() Make validation. mixed
create_keys() Create keys. array
post_consumer_data() Post consumer data. bool
handle_auth_requests() Handle auth requests. mixed
auth_endpoint() Auth endpoint. mixed
maybe_delete_key() Maybe delete key. mixed

Constants

Methods

__construct()

Setup class.

public __construct( ) : mixed
Tags
since
Return values
mixed

add_query_vars()

Add query vars.

public add_query_vars( $vars : array ) : string[]
Parameters
$vars : array

Query variables.

Tags
since
Return values
string[]

add_endpoint()

Add auth endpoint.

public static add_endpoint( ) : mixed
Tags
since
Return values
mixed

get_i18n_scope()

Get scope name.

protected get_i18n_scope( $scope : string ) : string
Parameters
$scope : string

Permission scope.

Tags
since
Return values
string

get_permissions_in_scope()

Return a list of permissions a scope allows.

protected get_permissions_in_scope( $scope : string ) : array
Parameters
$scope : string

Permission scope.

Tags
since
Return values
array

build_url()

Build auth urls.

protected build_url( $data : array , $endpoint : string ) : string
Parameters
$data : array

Data to build URL.

$endpoint : string

Endpoint.

Tags
since
Return values
string

get_formatted_url()

Decode and format a URL.

protected get_formatted_url( $url : string ) : string
Parameters
$url : string

URL.

Return values
string

make_validation()

Make validation.

protected make_validation( ) : mixed
Tags
since
throws

When validate fails.

Return values
mixed

create_keys()

Create keys.

protected create_keys( $app_name : string , $app_user_id : string , $scope : string ) : array
Parameters
$app_name : string

App name.

$app_user_id : string

User ID.

$scope : string

Scope.

Tags
since
Return values
array

post_consumer_data()

Post consumer data.

protected post_consumer_data( $consumer_data : array , $url : string ) : bool
Parameters
$consumer_data : array

Consumer data.

$url : string

URL.

Tags
since
throws

When validation fails.

Return values
bool

handle_auth_requests()

Handle auth requests.

public handle_auth_requests( ) : mixed
Tags
since
throws

When auth_endpoint validation fails.

Return values
mixed

auth_endpoint()

Auth endpoint.

protected auth_endpoint( $route : string ) : mixed
Parameters
$route : string

Route.

Tags
since
throws

When validation fails.

Return values
mixed

maybe_delete_key()

Maybe delete key.

private maybe_delete_key( $key : array ) : mixed
Parameters
$key : array

Key.

Tags
since
Return values
mixed
Back to the top