承接 ziorwebdev/woopress-license-hub-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ziorwebdev/woopress-license-hub-client

最新稳定版本:1.1.13

Composer 安装命令:

composer require ziorwebdev/woopress-license-hub-client

包简介

WooPress License Hub Client

README 文档

README

WooPress License Hub Client is a WordPress client library for integrating license activation, deactivation, renewal, and validation into premium plugins and themes. It communicates with WooPress License Hub, a WordPress license manager plugin that acts as the license server, to handle all license lifecycle operations via API. This package is client-only and requires a configured WooPress License Hub installation.

Installation

Install via Composer:

composer require ziorwebdev/woopress-license-hub-client

Usage

After installing the package, include the following code inside your WordPress plugin main file (e.g., your-plugin.php):

if ( ! function_exists( 'your_prefix_license_hub_client_integration' ) ) {
	function _your_prefix_license_hub_client_integration() {
		global $_your_prefix_license_hub_client;

		if ( ! isset( $_your_prefix_license_hub_client ) ) {
			$_your_prefix_license_hub_client = woopress_license_hub_client(
				array(
					'api_url'           => 'https://your-site.com/wp-json/wc/woopress-license-hub/',
					'product_key'       => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
					'plugin_file'       => __FILE__,
					'plugin_name'       => 'Your Plugin Name',
					'license_url'       => 'admin.php?page=your-plugin-slug',
					'parent_menu_slug'  => 'your-parent-menu-slug',
					'license_menu_slug' => 'your-plugin-slug',
				)
			);
		}

		return $_your_prefix_license_hub_client;
	}

	_your_prefix_license_hub_client_integration();
}

Configuration

The woopress_license_hub_client() function accepts an array of arguments to configure your plugin’s license integration:

Key Required Description
api_url ✅ Yes The full REST API URL of your License Hub server. Example: https://your-site.com/wp-json/wc/woopress-license-hub/
product_key ✅ Yes The unique product key registered in your License Hub server. Replace xxxxxxxxxxxxxxxxxxxxxxxxxxxxx with your actual product key.
plugin_file ✅ Yes Typically __FILE__. Used by WordPress to identify the plugin file where the client is running.
plugin_name ✅ Yes The display name of your plugin (e.g., "My Awesome Plugin"). This name will appear in the License page.
license_url ⚡ Optional The admin page URL where the license form should appear. Example: admin.php?page=your-plugin-slug. If you prefer adding it to Settings → Your Plugin, set this to: options-general.php?page=your-plugin-slug.
parent_menu_slug ⚡ Optional Defines the parent menu in the WordPress admin. For a top-level menu, set your own slug (e.g., your-parent-menu-slug). If you want it under Settings, use options-general.php.
license_menu_slug ✅ Yes The slug for your plugin’s license menu. Typically the same as your plugin slug (e.g., your-plugin-slug).

Example Setup

If your plugin is named "My Plugin" and your plugin slug is my-plugin, a typical configuration looks like this:

$_your_prefix_license_hub_client = woopress_license_hub_client(
	array(
		'api_url'           => 'https://licenses.mysite.com/wp-json/wc/woopress-license-hub/',
		'product_key'       => 'myplugin_1234567890abcdef',
		'plugin_file'       => __FILE__,
		'plugin_name'       => 'My Plugin',
		'license_url'       => 'admin.php?page=my-plugin',
		'parent_menu_slug'  => 'options-general.php',
		'license_menu_slug' => 'my-plugin',
	)
);

This will create a License page under Settings → My Plugin in your WordPress admin.

Notes

  • Always replace your_prefix with a unique prefix to avoid conflicts with other plugins.
  • Make sure the product_key matches the product registered on your License Hub server.
  • If you’re developing multiple plugins, each should have a unique product key.

统计信息

  • 总下载量: 243
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固