MySLP_Signup_Connector_Dashboard
extends MySLP_Signup_Base_Object
in package
Table of Contents
Properties
- $dashboard_account_url : mixed
- $dashboard_api_key : mixed
- $dashboard_settings_url : mixed
- $payment_processor : array<string|int, mixed>|WP_Error
- $plan_order : array<string|int, mixed>
- $plans : mixed
Methods
- __construct() : mixed
- get_instance() : MySLP_Signup_Base_Object
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- get_payment_processor() : array<string|int, mixed>|WP_Error
- Get payment processor data.
- get_plan() : mixed
- Get a specific property of a plan.
- get_plan_order() : array<string|int, mixed>
- Get the plan slug in order by rank.
- get_plans() : array<string|int, mixed>|void
- Get plans from the Dashboard Server
- initialize() : void
- Do these things when this object is invoked.
- get_rest() : array<string|int, mixed>|WP_Error
- Get a REST response.
Properties
$dashboard_account_url
public
mixed
$dashboard_account_url
$dashboard_api_key
public
mixed
$dashboard_api_key
$dashboard_settings_url
private
mixed
$dashboard_settings_url
$payment_processor
private
array<string|int, mixed>|WP_Error
$payment_processor
$plan_order
private
array<string|int, mixed>
$plan_order
= array()
$plans
private
mixed
$plans
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
get_instance()
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
public
static get_instance([null|array<string|int, mixed> $options = array() ]) : MySLP_Signup_Base_Object
Parameters
- $options : null|array<string|int, mixed> = array()
-
object init params
Return values
MySLP_Signup_Base_Objectget_payment_processor()
Get payment processor data.
public
get_payment_processor() : array<string|int, mixed>|WP_Error
Return values
array<string|int, mixed>|WP_Errorget_plan()
Get a specific property of a plan.
public
get_plan(string $slug, string $key[, bool $ignore_cache = false ]) : mixed
Parameters
- $slug : string
-
Which plan to get
- $key : string
-
The property we are interested in
- $ignore_cache : bool = false
-
should we ignore the cache (default false)
Return values
mixed —Returns WP_Error is there is a problem, the plan property otherwise.
get_plan_order()
Get the plan slug in order by rank.
public
get_plan_order() : array<string|int, mixed>
Return values
array<string|int, mixed>get_plans()
Get plans from the Dashboard Server
public
get_plans() : array<string|int, mixed>|void
Return values
array<string|int, mixed>|voidinitialize()
Do these things when this object is invoked.
public
initialize() : void
get_rest()
Get a REST response.
private
get_rest(string $url[, array<string|int, mixed> $body = array() ][, string $method = 'POST' ]) : array<string|int, mixed>|WP_Error
Parameters
- $url : string
- $body : array<string|int, mixed> = array()
- $method : string = 'POST'