定制 ideologix/dlm-wp-updater 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ideologix/dlm-wp-updater

Composer 安装命令:

composer require ideologix/dlm-wp-updater

包简介

PHP WordPress updater for your plugins and themes that utilizes the Digital License Manager PRO REST APIs

README 文档

README

Updater package for WordPress that utilizes the Digital License Manager PRO REST API for update checks and update downloads. It can be integrated in every plugin that you want to provide updates through Digital License Manager PRO.

Requirements

  1. WordPress 4.0+
  2. Digital License Manager PRO (on your plugin update server site)

Configuration

  1. Login to your Digital License Manager store.
  2. Go to "License Manager" > "Software" > "Add New" and create software item.
  3. Obtain the software ID and then proceed with the next step Installation.

Installation

The PHP package can be imported either with Composer or manually with including the autoload.php file:

composer install ideologix/dlm-wp-updater

or manually, first download the package and save it to your plugin, then include it as follows:

require_once 'path/to/dlm-wordpress-updater/autoload.php';

Integration

The following example explains how to use the library within your PRO/Premium plugin.

use \IdeoLogix\DigitalLicenseManagerUpdaterWP\Main;

try {
    $instance = new Main( array(
        'id'              => 'The software ID',
        'name'            => 'The software Name',
        'file'            => '/path/to/wp-content/plugins/your-plugin/your-plugin.php', // Tip: use __FILE__ to define it in your-plugin.php
        'basename'        => 'your-plugin/your-plugin.php', // Tip: use plugin_basename( __FILE__ ) in your-plugin.php
        'version'         => YOUR_PLUGIN_VERSION, // Tip: Define this in your-plugin.php file and increment with every release.
        'url_settings'    => 'https://url-to-your-plugin/settings-page',
        'url_purchase'    => 'https://url-to-your-website/purchase-page',
        'consumer_key'    => 'ck_XXXXXXXXXXXXXXXXX',
        'consumer_secret' => 'cs_XXXXXXXXXXXXXXXXX',
        'api_url'         => 'https://yourwoocommercesite.com/wp-json/dlm/v1/',
        'prefix'          => 'dlm',
    ) );
} catch (\Exception $e) {
    error_log('Error: ' . $e->getMessage());
}

// Important: To display the activation form in your settings page (url_settings), use the renderActivationForm() method like bellow.
// Note: If you want to override the activation form, you can extend the Activator class with your own class and override the renderActivationForm() method.
$instance->getActivator()->renderActivationForm();

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2021-11-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固