One of the tasks the extension developers face is retrieving the data about the Plesk license keys installed on the server. To make it easy for an extension to obtain the Plesk license key information, the pm_License class was introduced in Plesk 12.5.
The pm_License class enables the retrieval of the main and add-on Plesk license keys, as well as retrieval of the list of all add-on keys with the ability to filter by the product name. Some usage examples are provided below:
Creating a new main license key object:
Creating a new add-on license key object:
Retrieving the values of all license key properties:
Retrieving the value of a license key property with a specific name:
Retrieving the list of all add-on keys:
Retrieving the list of all add-on keys with a specific product name: