Constants

OVERRIDE_HASH

OVERRIDE_HASH ='caf9da518b5d4b46c2ef1f9d7cba50ad'

ACTIVATE_KEY

ACTIVATE_KEY ='activate_key'

DEACTIVATE_KEY

DEACTIVATE_KEY ='deactivate_key'

CHECK_KEY

CHECK_KEY ='check_key'

Properties

$license

$license :

Type

$is_woocommerce

$is_woocommerce :

Type

$is_edd

$is_edd :

Type

$saving_key

$saving_key :

Type

$deferred_message

$deferred_message :

Type

Methods

__construct()

__construct(\Barn2\PTP_Lib\Plugin\License\License  $license,  $is_woocommerce = false,  $is_edd = false)

Parameters

\Barn2\PTP_Lib\Plugin\License\License $license
$is_woocommerce
$is_edd

register()

register()

process_license_action()

process_license_action()

Process a license action from the plugin license settings page (i.e. activate, deactivate or check license)

get_license_key_setting()

get_license_key_setting()

get_license_override_setting()

get_license_override_setting()

save_license_key()

save_license_key(string  $license_key): string

Save the specified license key.

If there is a valid key currently active, the current key will be deactivated first before activating the new one.

Parameters

string $license_key

The license key to save.

Returns

string —

The license key.

save_posted_license_key()

save_posted_license_key()

get_license_setting_name()

get_license_setting_name()

handle_edd_license_message()

handle_edd_license_message(  $options)

Parameters

$options

activate_license()

activate_license(  $license_key)

Parameters

$license_key

add_settings_message()

add_settings_message(  $sucess_message,  $error_message,  $success = true)

Parameters

$sucess_message
$error_message
$success

get_license_description()

get_license_description(): string

Retrieve the description for the license key input, to display on the settings page.

Returns

string —

The license key status message

is_license_action()

is_license_action(  $action)

Parameters

$action

is_license_setting_readonly()

is_license_setting_readonly()

license_action_button()

license_action_button(  $input_name,  $button_text)

Parameters

$input_name
$button_text