arraypress/lemon-squeezy-updater
Composer 安装命令:
composer require arraypress/lemon-squeezy-updater
包简介
A WordPress plugin library for integrating Lemon Squeezy license management and updater capabilities, facilitating seamless activation, deactivation, and update checks for plugins.
README 文档
README
This library seamlessly integrates with WordPress plugins, adding a simple yet powerful licensing field directly into
the WordPress plugins list. It enables effortless activation, deactivation, and management of plugin licenses
through AJAX for a streamlined user experience. With just one line of code, this functionality can be added to any
WordPress plugin, facilitating license validations against product_id, store_id, and variation_id to ensure
legitimacy
before activation. Additionally, it supports an optional renewal URL feature, guiding users to repurchase when licenses
expire.
Key Features:
- License Activation and Validation: Simplifies the process of activating and validating license keys, ensuring that users are authorized to use the plugin. Validates against product_id, store_id, and variation_ids for enhanced security.
- Seamless Updates: Automates the checking for plugin updates and manages the update process, ensuring plugins remain up-to-date effortlessly.
- Easy Integration: Designed for high compatibility with various WordPress environments, it integrates smoothly into any plugin with minimal effort.
- Secure API Communication: Utilizes secure API calls for communication with Lemon Squeezy for license management and update repositories, ensuring data protection.
- Streamlined User Experience: Leverages AJAX for real-time license operations, providing a seamless experience without page reloads.
- Renewal URL Support: Offers an optional renewal URL for expired licenses, directing users to repurchase, thus maintaining continuity and support.
Leverage the Lemon Squeezy WordPress Plugin Updater and License Manager to ensure your plugins are efficiently managed, securely licensed, and always up to date.
Minimum Requirements
- PHP: 7.4 or later
- WordPress: 6.4.3 or later
Important: The Lemon Squeezy - Better Endpoints plugin must be installed and active on your website to use this library.
Installation
To integrate the library into your WordPress plugin, use Composer:
composer require arraypress/lemon-squeezy-updater
Including the Library in Your Plugin
Include the Composer autoloader in your plugin to access the library functionalities:
require_once __DIR__ . '/vendor/autoload.php';
Example Integration
use ArrayPress\LemonSqueezy\Updater; // Initialize the updater with your Lemon Squeezy store details $updater = new Updater( __FILE__, 'https://example.com/wp-json/lsq/v1', '1.0.0', // Optional. Leave empty to use the WordPress plugin version number 'store_id', // Optional but recommended. Your Lemon Squeezy Store ID (12345) 'product_id', // Optional but recommended. Your Lemon Squeezy Product ID (12345) 'variation_id', // Optional. Your Lemon Squeezy Product Variation ID (12345) 'https://example.com/my-plugin-page' // Optional. Expiration Renewal URL ); if ( ! $updater->is_license_activated() ) { // Disable functionality in your plugin if not active }
Contributions
Contributions to improve the library are welcome. Please submit pull requests or create issues on GitHub for any bugs or feature suggestions.
License
This library is licensed under the GPL-2.0-or-later. It is free to use and modify according to the terms of the GNU General Public License.
arraypress/lemon-squeezy-updater 适用场景与选型建议
arraypress/lemon-squeezy-updater 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18 次下载、GitHub Stars 达 9, 最近一次更新时间为 2024 年 02 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 arraypress/lemon-squeezy-updater 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 arraypress/lemon-squeezy-updater 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 25
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2024-02-21
