| 1 |
<?php |
| 2 |
|
| 3 |
namespace YayMailScoped\YayCommerce\AdminShell\Contracts; |
| 4 |
|
| 5 |
/** |
| 6 |
* Optional interface for plugins that host licensed addons. |
| 7 |
* |
| 8 |
* When a plugin adapter implements this alongside PluginMenuAdapter, |
| 9 |
* AdminShell creates an AddonBridge that reads the declared filter, |
| 10 |
* registers addon entries in the LicenseRegistry, and renders |
| 11 |
* license cards for them on the Licenses page. |
| 12 |
* |
| 13 |
* Example: YayMail Lite's adapter implements both PluginMenuAdapter |
| 14 |
* and AddonHostAdapter, returning 'yaymail_available_licensing_plugins'. |
| 15 |
* All existing addons continue using that filter unchanged. |
| 16 |
*/ |
| 17 |
interface AddonHostAdapter |
| 18 |
{ |
| 19 |
/** |
| 20 |
* WordPress filter name that addons use to register their licensing data. |
| 21 |
* |
| 22 |
* The filter must return an array of entries, each with: |
| 23 |
* [ 'slug', 'name', 'basename', 'file', 'url', 'item_id' ] |
| 24 |
* |
| 25 |
* Same format as yaycommerce_licensing_plugins. |
| 26 |
*/ |
| 27 |
public function get_addon_licensing_filter(): string; |
| 28 |
} |
| 29 |
|