Store Locator Plus®

MySLP_DSRA
in package

Class MySLP_DSRA

WP_REST_Server::EDITABLE - 'POST, PUT, PATCH' WP_REST_Server::READABLE - 'GET' WP_REST_Server::CREATABLE - 'POST'

TODO: clean out all the is_multisite checks and drop code for !is_multisite(), this should only be running in multsite

Table of Contents

Properties

$account_endpoint  : mixed
$DSIGN_key  : mixed
$myslp_namespace  : mixed
$paypal_options  : mixed
$site_architect_endpoint  : mixed

Methods

__construct()  : mixed
Default things to do/load when running this plugin
activate()  : mixed
Plugin activation function.
add_account()  : StdClass|WP_Error
Start adding new sub site here
admin_script()  : mixed
Include scripts/style for this plugin
edit_account()  : mixed
Edit user meta data
flatten_array()  : array<string|int, mixed>|mixed
generate_api_key()  : mixed
Generate randomize string for API key
get_account_plan()  : mixed
Get Site Architect Levels
get_endpoint()  : string
Get Endpoint
get_payment_meta()  : array<string|int, mixed>|WP_Error
Get Payment Meta.
myslp_email_reg_data()  : mixed
Email user regarding registration data
myslp_get_base_email()  : mixed
Create username based on email
register_routes()  : mixed
Register necessary routes in here
rest_api_options()  : mixed
Network admin page for generating API key
system_settings()  : mixed
API setting page
get_api_key()  : mixed
Return our API key (and cache it).
get_sa_allowed_plugins()  : mixed
Get Site Architect Levels
has_valid_api_key()  : bool
Return true if the specified API key is valid.
save_setting()  : mixed
Save an admin tab setting.
send_error()  : WP_Error
Send back an error.

Properties

$account_endpoint

private mixed $account_endpoint = 'account'

$myslp_namespace

private mixed $myslp_namespace = 'myslp-signup/v2'

$paypal_options

private mixed $paypal_options = array('api_username' => '', 'api_password' => '', 'api_signature' => '', 'use_ec_sandbox' => '', 'version' => '', 'sbncode' => '', 'use_proxy' => '', 'proxy_host' => '', 'proxy_port' => '')

$site_architect_endpoint

private mixed $site_architect_endpoint = 'site-architect'

Methods

__construct()

Default things to do/load when running this plugin

public __construct() : mixed

activate()

Plugin activation function.

public static activate() : mixed

add_account()

Start adding new sub site here

public add_account(WP_REST_Request $request) : StdClass|WP_Error
Parameters
$request : WP_REST_Request
Tags
rest-route

/myslp-signup/v2/account/

Return values
StdClass|WP_Error

admin_script()

Include scripts/style for this plugin

public admin_script( $hook) : mixed
Parameters
$hook :

edit_account()

Edit user meta data

public edit_account(WP_REST_Request $request) : mixed
Parameters
$request : WP_REST_Request
Tags
Param

: id user ID account_status customer account status plan customer subscription plan

flatten_array()

public flatten_array( $arg) : array<string|int, mixed>|mixed
Parameters
$arg :
Return values
array<string|int, mixed>|mixed

generate_api_key()

Generate randomize string for API key

public generate_api_key() : mixed

get_account_plan()

Get Site Architect Levels

public get_account_plan() : mixed
Tags
used-by

WP_REST_Server::dispatch()

get_endpoint()

Get Endpoint

public get_endpoint( $endpoint) : string
Parameters
$endpoint :
Return values
string

get_payment_meta()

Get Payment Meta.

public get_payment_meta(WP_REST_Request $request) : array<string|int, mixed>|WP_Error
Parameters
$request : WP_REST_Request
Return values
array<string|int, mixed>|WP_Error

myslp_email_reg_data()

Email user regarding registration data

public myslp_email_reg_data(mixed $site_url, mixed $username, mixed $password, mixed $email) : mixed
Parameters
$site_url : mixed
$username : mixed
$password : mixed
$email : mixed

myslp_get_base_email()

Create username based on email

public myslp_get_base_email(mixed $email) : mixed
Parameters
$email : mixed

register_routes()

Register necessary routes in here

public register_routes() : mixed

rest_api_options()

Network admin page for generating API key

public rest_api_options() : mixed

system_settings()

API setting page

public system_settings() : mixed

get_api_key()

Return our API key (and cache it).

private get_api_key() : mixed

get_sa_allowed_plugins()

Get Site Architect Levels

private get_sa_allowed_plugins() : mixed

has_valid_api_key()

Return true if the specified API key is valid.

private has_valid_api_key(string $key) : bool
Parameters
$key : string
Return values
bool

save_setting()

Save an admin tab setting.

private save_setting( $slug,  $select_tab,  $message) : mixed
Parameters
$slug :
$select_tab :
$message :

send_error()

Send back an error.

private send_error( $code) : WP_Error
Parameters
$code :
Return values
WP_Error

        
On this page

Search results