\DevOwl\RealProductManagerWpClient\licensePluginUpdateChecker

Enable external updates with the help of PUC. This should be only done in non-free plugins!

Summary

Methods
Properties
Constants
getPluginConstantPrefix()
setupConstants()
probablyEnableExternalUpdates()
validateResult()
queryArg()
isEnabled()
getLicense()
getCheckUpdateLink()
getPuc()
getPluginUpdate()
instance()
No public properties found
ENDPOINT
No protected methods found
No protected properties found
N/A
__construct()
$pluginUpdate
$puc
N/A

Constants

ENDPOINT

ENDPOINT ='1.0.0/wp/product/version'

Properties

$puc

$puc :\Puc_v4p4_Plugin_UpdateChecker|null

Plugin Update Checker instance.

Type

\Puc_v4p4_Plugin_UpdateChecker|null

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.

probablyEnableExternalUpdates()

probablyEnableExternalUpdates()

Enable it, probably!

validateResult()

validateResult(\WP_Error|array  $response)

The metadata JSON can also return error codes in case of license expiration / revoke.

Let's check against this and save the error code to our WP instance.

Parameters

\WP_Error|array $response

queryArg()

queryArg(array  $queryArgs)

Add the license key to the update request.

Parameters

array $queryArgs

isEnabled()

isEnabled()

Check if Plugin Update Checker is currently active.

getLicense()

getLicense()

Get the first found license as we do not differ between multiple licenses in a multisite environment. WordPress does not allow to update per-site because a plugin is installed network-wide.

getCheckUpdateLink()

getCheckUpdateLink()

Generate a "Check for Updates" link so users can trigger this manually.

getPuc()

getPuc()

Get the instance of `Puc_v4_Factory`.

getPluginUpdate()

getPluginUpdate()

Get plugin update instance.