ERROR_CODE_ALREADY_ACTIVATED
ERROR_CODE_ALREADY_ACTIVATED ='rpm_wpc_already_exists'
Handle license activation.
skip(boolean $noUsage = false)
Mark the license as "ever seen form once", see also `#hasInteractedWithFormOnce`.
You should use the REST API endpoint plugin-update/:slug/skip
for this.
$noUsage = true
:
Mark the license as "no usage". That means, the license code is not needed and not considered for "fully licensed" or "partial licensed".
Use case: User has installed the plugin network wide, but want to use the premium plugin only on one sub site.
boolean | $noUsage |
activate(string $code,string $installationType,boolean $telemetry,boolean $newsletterOptIn,string $firstName,string $email)
Activate this license with a given code. It returns a `WP_Error` if a code is already active.
string | $code | |
string | $installationType | |
boolean | $telemetry | |
boolean | $newsletterOptIn | |
string | $firstName | |
string |
executeDeferredAction(string $actionName,callable|integer $actionOrExpire,integer $periodInDays = 1,string $minimumWpHook = 'init')
Schedules an action (callable) for deferred execution. The action is called only once for the given period in days. The action gets called at the time of license activation so we can scutter e.g. API calls to our license server independent of configured time and timezone of current server.
string | $actionName | |
callable|integer | $actionOrExpire | If you pass |
integer | $periodInDays | |
string | $minimumWpHook |
getReceivedClientProperty(string $key,mixed $default = false)
Get a received client property by key from the last contact to our license server for this activation.
This returns also a result if you have deactivated your license already.
string | $key | |
mixed | $default |