\DevOwl\RealProductManagerWpClient\licensePluginUpdateLicensePool

Use this trait together in `PluginUpdate`.

Summary

Methods
Properties
Constants
plugins_update_check_locales()
updateLicenseSettings()
getCurrentBlogLicense()
isLicensed()
isUnlicensed()
isPartialLicensed()
getFirstFoundLicense()
getLicenses()
getUniqueLicenses()
getLicenseActivationClient()
No public properties found
No constants found
constructPluginUpdateLicensePool()
validateLicenseCodes()
No protected properties found
N/A
No private methods found
$licenses
$licenseActivationClient
N/A

Properties

$licenses

$licenses :array<mixed,\DevOwl\RealProductManagerWpClient\license\License>

License instances.

Type

array<mixed,\DevOwl\RealProductManagerWpClient\license\License>

Methods

plugins_update_check_locales()

plugins_update_check_locales(array  $locales)

Unfortunately, `wp_update_plugins()` does not provide any hook but we want to let our remote server know about installed WP version, PHP version, .

..

We misuse this hook to transfer them to our remote server.

Parameters

array $locales

updateLicenseSettings()

updateLicenseSettings(array  $licenses,boolean  $telemetry = false,boolean  $newsletterOptIn = false,string  $firstName = '',string  $email = '')

Update license settings for this plugin.

Parameters

array $licenses

Pass null to activate all unlicensed, free sites

boolean $telemetry
boolean $newsletterOptIn
string $firstName
string $email

getCurrentBlogLicense()

getCurrentBlogLicense(): \DevOwl\RealProductManagerWpClient\license\License

Get the license for the current blog id.

Returns

\DevOwl\RealProductManagerWpClient\license\License

isLicensed()

isLicensed()

Check if plugin is fully licensed.

isUnlicensed()

isUnlicensed()

Check if plugin is unlicensed (also partially licensed).

isPartialLicensed()

isPartialLicensed()

Check if plugin is only partial licensed (e.g. missing sites in multisite).

getFirstFoundLicense()

getFirstFoundLicense()

Get first found license as we can not update per-site in multisite (?).

getLicenses()

getLicenses(boolean  $checkRemoteStatus = false): array<mixed,\DevOwl\RealProductManagerWpClient\license\License>

Get all licenses for each blog (when multisite is enabled). Attention: If a blog uses the same hostname as a previous known blog, they share the same `License` instance.

Parameters

boolean $checkRemoteStatus

Returns

array<mixed,\DevOwl\RealProductManagerWpClient\license\License>

getUniqueLicenses()

getUniqueLicenses(boolean  $skipNoUsage = false): array<mixed,\DevOwl\RealProductManagerWpClient\license\License>

The same as `getLicenses`, but only get unique `License` instances.

Parameters

boolean $skipNoUsage

Pass true to skip licenses which are not in usage

Returns

array<mixed,\DevOwl\RealProductManagerWpClient\license\License>

getLicenseActivationClient()

getLicenseActivationClient()

Get license activation client.

constructPluginUpdateLicensePool()

constructPluginUpdateLicensePool()

C'tor.

validateLicenseCodes()

validateLicenseCodes(array  $licenses,boolean  $telemetry,boolean  $newsletterOptIn,string  $firstName,string  $email)

Validate license codes.

Parameters

array $licenses
boolean $telemetry
boolean $newsletterOptIn
string $firstName
string $email