makeweb / edd-software-licensing-updater

该包的最新版本(1.0.1)没有可用的许可信息。

1.0.1 2017-05-31 06:47 UTC

This package is not auto-updated.

Last update: 2024-09-29 04:03:27 UTC


README

使用EDD软件许可使您的插件或主题可更新。基于@pippinsplugins提供的示例代码。

安装

通过命令行使用composer安装。

Composer

如果您没有安装composer,可以在这里下载:here.

使用Composer安装

从项目的根目录下执行以下命令:

composer require makeweb/edd-software-licensing-updater

Easy Digital Downloads - 软件许可扩展

您还需要在服务器上运行Easy Digital Downloads软件许可的一个实例:Easy Digital Downloads Software Licensing.

用法

请确保您在主插件文件中包含composer自动加载器

require (__DIR__.'/vendor/autoload.php');

这告诉PHP去哪里寻找包所需的类,这样您就无需为每个PHP文件编写include/require语句。

将以下内容添加到您的主插件文件中,以启动插件更新器。

/**
 * Boot plugin update
 **/
(new \MakeWeb\EDDSoftwareLicensingUpdater\Updater)
    ->setHostUrl('https://my-server-running-eddsl.com')
    ->setName('My Plugin')
    ->setPluginFilePath(__FILE__)
    ->setVersion('1.0.0')
    ->setLicenseKey($licenseKey)
    ->register();

请确保将$licenseKey的值设置为EDD购买生成的许可密钥。