Constants

OPTION_NAME_FIRST_INITIALIZATION_PREFIX

OPTION_NAME_FIRST_INITIALIZATION_PREFIX =RPM_WP_CLIENT_OPT_PREFIX . '-puFirst_'

ERROR_CODE_INVALID_LICENSES

ERROR_CODE_INVALID_LICENSES ='rpm_wpc_invalid_licenses'

ERROR_CODE_INVALID_NEWSLETTER

ERROR_CODE_INVALID_NEWSLETTER ='rpm_wpc_invalid_newsletter'

ERROR_CODE_BLOG_NOT_FOUND

ERROR_CODE_BLOG_NOT_FOUND ='rpm_wpc_blog_not_found'

ERROR_CODE_NONE_IN_USAGE

ERROR_CODE_NONE_IN_USAGE ='rpm_wpc_none_in_usage'

ERROR_CODE_INVALID_KEYS

ERROR_CODE_INVALID_KEYS ='rpm_wpc_invalid_keys'

Properties

$licenses

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

License instances.

Type

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

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the prefix of this package so we can utils package natively.

Returns

string

setupConstants()

setupConstants()

Make sure the RPM_WP_CLIENT constants are available.

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.

initialize()

initialize()

Initialize PRO updates for this plugin. This is before the `init` hook was called!

init()

init()

`init` hook which does e.g. automatically activate licenses depending on a WordPress hook.

auto_update_plugin()

auto_update_plugin(boolean|null  $update,object  $item): boolean|null

Check for auto updates and do not update major versions.

Parameters

boolean|null $update
object $item

Returns

boolean|null

enableAutoUpdates()

enableAutoUpdates()

Enable auto updates for this plugin.

getFirstInitializationTimestamp()

getFirstInitializationTimestamp(): integer

Get the timestamp which represents the existence of the first time this plugin updater was used.

Returns

integer

getDaysSinceFirstInitialization()

getDaysSinceFirstInitialization()

Get the days since the first initialization. See `#getFirstInitializationTimestamp`. Imagine, you install the plugin today, you will get `1` for today, `2` for tomorrow, and so on.

getView()

getView()

Get view.

getInitiator()

getInitiator()

Get initiator.

getAnnouncementPool()

getAnnouncementPool()

Get announcement pool.

getPluginUpdateChecker()

getPluginUpdateChecker()

Get Plugin Update Checker.

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

getPotentialBlogIds()

getPotentialBlogIds(): array<mixed,integer>

Get all blog ids for this WordPress instance (Multisite) which needs a license.

Returns

array<mixed,integer>