WC_Gateway_Redsys_License
in package
Licensing class for License Manager requests
Tags
Table of Contents
Properties
- $api_data : array<string|int, mixed>
- Data for the API request.
- $api_url : string
- API URL.
- $hide_menu_after_activate : bool
- Whether to hide the menu after activation.
- $name : string
- Name of the item.
- $prefix : string
- Prefix used for custom actions or filters.
- $slug : string
- Slug identifier.
- $version : string
- Version of the item.
- $wp_override : bool
- Whether WordPress overrides default behavior.
Methods
- __construct() : mixed
- Class constructor.
- activate_license() : mixed
- Activate license process request to the marketplace
- admin_notice() : mixed
- Render Admin Notice with Activation Link
- check_update() : stdClass
- Check for Updates by request to the marketplace and modify the update array.
- http_request_args() : array<string|int, mixed>
- Disable SSL verification in order to prevent download update failures
- in_plugin_update_message() : void
- Function for major updates
- init() : void
- Set up WordPress filters to hook into WP's update process.
- license_menu() : mixed
- Add submenu to Plugins with license settings
- license_page() : mixed
- Render HTML for License options page
- plugins_api_filter() : object
- Updates information on the "View version x.x details" popup with custom data.
- successful_activation_redirect() : string
- Redirect after successful activation
- upgrader_pre_install() : mixed
- Clear transients
- api_request() : false|object
- Calls the API and, if successfull, returns the object delivered by the API.
- extend_download_url() : string
- Extends the download URL with parameters needed for the API call.
Properties
$api_data
Data for the API request.
public
array<string|int, mixed>
$api_data
$api_url
API URL.
public
string
$api_url
$hide_menu_after_activate
Whether to hide the menu after activation.
public
bool
$hide_menu_after_activate
$name
Name of the item.
public
string
$name
$prefix
Prefix used for custom actions or filters.
public
string
$prefix
$slug
Slug identifier.
public
string
$slug
$version
Version of the item.
public
string
$version
$wp_override
Whether WordPress overrides default behavior.
public
bool
$wp_override
Methods
__construct()
Class constructor.
public
__construct(string $_api_url, string $_plugin_file[, array<string|int, mixed> $_api_data = null ]) : mixed
Parameters
- $_api_url : string
-
The URL pointing to the custom API endpoint.
- $_plugin_file : string
-
Path to the plugin file.
- $_api_data : array<string|int, mixed> = null
-
Optional data to send with API calls.
Tags
activate_license()
Activate license process request to the marketplace
public
activate_license() : mixed
admin_notice()
Render Admin Notice with Activation Link
public
admin_notice() : mixed
check_update()
Check for Updates by request to the marketplace and modify the update array.
public
check_update(array<string|int, mixed> $transient) : stdClass
Parameters
- $transient : array<string|int, mixed>
-
plugin update array build by WordPress.
Return values
stdClass —modified plugin update array.
http_request_args()
Disable SSL verification in order to prevent download update failures
public
http_request_args(array<string|int, mixed> $args, string $url) : array<string|int, mixed>
Parameters
- $args : array<string|int, mixed>
-
arguments.
- $url : string
-
url.
Return values
array<string|int, mixed> —$array arguments.
in_plugin_update_message()
Function for major updates
public
in_plugin_update_message(array<string|int, mixed> $args) : void
Parameters
- $args : array<string|int, mixed>
-
plugin data.
init()
Set up WordPress filters to hook into WP's update process.
public
init() : void
Tags
license_menu()
Add submenu to Plugins with license settings
public
license_menu() : mixed
Tags
license_page()
Render HTML for License options page
public
license_page() : mixed
plugins_api_filter()
Updates information on the "View version x.x details" popup with custom data.
public
plugins_api_filter(mixed $_data[, string $_action = '' ][, object $_args = null ]) : object
Parameters
- $_data : mixed
-
Plugin data.
- $_action : string = ''
-
The type of information being requested from the Plugin Install API.
- $_args : object = null
-
Plugin API arguments.
Tags
Return values
object —$_data Plugin data.
successful_activation_redirect()
Redirect after successful activation
public
successful_activation_redirect() : string
Return values
stringupgrader_pre_install()
Clear transients
public
upgrader_pre_install(mixed $return, mixed $plugin) : mixed
Parameters
- $return : mixed
-
return value.
- $plugin : mixed
-
plugin data.
api_request()
Calls the API and, if successfull, returns the object delivered by the API.
private
api_request(string $_action, array<string|int, mixed> $_data) : false|object
Parameters
- $_action : string
-
The requested action.
- $_data : array<string|int, mixed>
-
Parameters for the API action.
Tags
Return values
false|objectextend_download_url()
Extends the download URL with parameters needed for the API call.
private
extend_download_url(string $download_url, array<string|int, mixed> $data) : string
Parameters
- $download_url : string
-
The download URL.
- $data : array<string|int, mixed>
-
Plugin data.