appcheap / license
Wordpress插件Appcheap许可证
1.1.2
2024-04-03 11:06 UTC
Requires
- php: ^7.4|^8.0
- guzzlehttp/guzzle: ^7.8
Requires (Dev)
- phpunit/phpunit: ^9.6
- squizlabs/php_codesniffer: ^3.9
This package is not auto-updated.
Last update: 2024-09-18 13:06:52 UTC
README
要求
安装
您可以使用Composer或简单地下载发布版本
Composer
首选方法是通过composer。如果您还没有安装composer,请遵循安装说明。
一旦安装了composer,请在项目的根目录中执行以下命令来安装此库
composer require appcheap/license:^1.0
最后,在主插件文件中自动加载库,如下所示
require_once __DIR__ . '/vendor/autoload.php';
用法
初始化客户端
$client = new Appcheap\Client([ 'identify' => 'app-builder', 'base_uri' => 'https://verify.appcheap.io/api/v1', 'plugin_file' => __FILE__, ]);
插件更新
$plugin = new Appcheap\Plugin($client); $plugin->run();
注册许可证页面
$verify = new Appcheap\Verify( $client ); $license_page = $verify->registerLicensePage( array( 'parent_slug' => 'options-general.php', 'page_title' => 'License', 'menu_title' => 'License', 'menu_slug' => 'appcheap-license', ) );