Eeco_Gift_Cards_Update_Client
in package
Client for our API handling plugin updates and license validation.
NOTICE: This class needs to be installed inside the includes folder of a plugin and the plugin main file must be named identically to the plugin folder.
Table of Contents
- $api_site : mixed
- $data : mixed
- $error_mssg : mixed
- $license_option : mixed
- $plugin_slug : mixed
- $update_time : mixed
- __construct() : mixed
- after_update() : mixed
- connection_error() : mixed
- Display error message in the wp-admin if we have problems connecting to the license API.
- connection_success() : mixed
- Display success message on valid response from the license API
- custom_update_mssg() : mixed
- Add our own custom message to the end of the WP default message.
- force_update_check() : mixed
- Clear cached API response from transient so we can force a update check.
- is_valid() : mixed
- Returns true if this plugin has an active license.
- update_check() : mixed
- update_info() : mixed
- Retrive update information from our server and display them in the view details page.
- call_api() : mixed
- Call the Eeco API, handle http errors and return fetched response body json as a stdClass PHP object.
- generate_update_mssg() : mixed
- Generate the error message from code given by the API.
- get_update_info() : mixed
- Get the plugins update information from The Eeco API.
- register_actions() : mixed
- Register the WordPress actions needed in this class
- register_filters() : mixed
- Register the WordPress filters needed in this class
- set_configs() : mixed
- Configs for the API.
Properties
$api_site
private
mixed
$api_site
$data
private
mixed
$data
$error_mssg
private
mixed
$error_mssg
$license_option
private
mixed
$license_option
$plugin_slug
private
mixed
$plugin_slug
$update_time
private
mixed
$update_time
Methods
__construct()
public
__construct() : mixed
Return values
mixed —after_update()
public
after_update(mixed $upgrader_object, mixed $options) : mixed
Parameters
- $upgrader_object : mixed
- $options : mixed
Return values
mixed —connection_error()
Display error message in the wp-admin if we have problems connecting to the license API.
public
connection_error() : mixed
Return values
mixed —connection_success()
Display success message on valid response from the license API
public
connection_success() : mixed
Return values
mixed —custom_update_mssg()
Add our own custom message to the end of the WP default message.
public
custom_update_mssg(mixed $plugin_data, mixed $response) : mixed
Parameters
- $plugin_data : mixed
- $response : mixed
Return values
mixed —force_update_check()
Clear cached API response from transient so we can force a update check.
public
force_update_check([mixed $dont_use = null ][, mixed $these = null ][, mixed $please = null ]) : mixed
Parameters
- $dont_use : mixed = null
- $these : mixed = null
- $please : mixed = null
Return values
mixed —is_valid()
Returns true if this plugin has an active license.
public
static is_valid() : mixed
Return values
mixed —update_check()
public
update_check(mixed $transient) : mixed
Parameters
- $transient : mixed
Return values
mixed —update_info()
Retrive update information from our server and display them in the view details page.
public
update_info(mixed $res, mixed $action, mixed $args) : mixed
Parameters
- $res : mixed
- $action : mixed
- $args : mixed
Return values
mixed —call_api()
Call the Eeco API, handle http errors and return fetched response body json as a stdClass PHP object.
private
call_api(string $action, array<string|int, mixed> $params) : mixed
Parameters
- $action : string
-
The API action to be called
- $params : array<string|int, mixed>
-
The http query params needed by the action
Return values
mixed —generate_update_mssg()
Generate the error message from code given by the API.
private
generate_update_mssg(mixed $body) : mixed
Parameters
- $body : mixed
Return values
mixed —get_update_info()
Get the plugins update information from The Eeco API.
private
get_update_info() : mixed
Return values
mixed —register_actions()
Register the WordPress actions needed in this class
private
register_actions() : mixed
Return values
mixed —register_filters()
Register the WordPress filters needed in this class
private
register_filters() : mixed
Return values
mixed —set_configs()
Configs for the API.
private
set_configs() : mixed