2017 © Pedro Peláez
 

library wordpress-plugin-updater

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

image

smoolabs/wordpress-plugin-updater

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  • Wednesday, July 18, 2018
  • by capevace
  • Repository
  • 1 Watchers
  • 2 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 4 Open issues
  • 21 Versions
  • 82 % Grown

The README.md

wordpress-plugin-updater

The WordPress Plugin Integration for the WordPress License Server., (*1)

Usage

There's two ways you can integrate this and enable automatic updates for your own plugin., (*2)

Using Composer

If you're already using Composer, you'll know what to do., (*3)

If not, you'll need to install Composer on your computer and run composer init. This will initialize composer in your packages root., (*4)

Once that is complete, run this:, (*5)

composer require smoolabs/wordpress-plugin-updater

Composer will then install the integration into the vendor/ folder., (*6)

To include the plugin files now, simply include the vendor/autoload.php file., (*7)

<?php

require_once 'vendor/autoload.php';

Without Composer

Download this repository as a .zip file and extract it somewhere into your plugin files. Then just include the loader.php file., (*8)

<?php

require_once '/path/to/updater/loader.php';

Setup

There's only one thing you'll need to do, to enable the integration once you've included it into your project., (*9)

In your plugins main file, paste this code:, (*10)

$client = \Smoolabs\WPU\V4\WPLSController::initClient('http://url-to-wpls.com', array(
    'name'      => 'Example Plugin Name',
    'version'   => '1.0.0',
    'path'      => __FILE__,
    'slug'      => 'example-plugin-slug'
));

Now, replace Example Plugin Name with your plugins name, http://update-server-url.com with the URL where you hosted the update server, my-example-plugin with your plugin slug (for example the plugin folders name) and 1.0.0 with your current plugins version., (*11)

That's all you have to do! The plugin will now receive automatic updates once you make them available on your server (of course, only if the user supplied a license)!, (*12)

Disabling functionality until License is entered

You may want to stop your buyers from using your plugin until they have entered their licenses. You can easily disable functionality like this:, (*13)

// Your Updater instance
$client = \Smoolabs\...;

if ($client->isActivated()) {
  /* 
   * The User has activated the plugin.
   * Add your plugin functionality here.
   */
} else {
  /* 
   * The User has *NOT* activated the plugin.
   * Add activation messages etc here, for example on your plugin settings page.
   */
}

Please make sure that this complies with Envato's rules on locking fieatures behind licenses! The plugin may not be accepted otherwise., (*14)

The Versions

18/07 2018

v3.x-dev

3.9999999.9999999.9999999-dev

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

05/07 2018

dev-master

9999999-dev

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/06 2018

2.0.1

2.0.1.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/06 2018

2.0.0

2.0.0.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

25/03 2018

1.3.3

1.3.3.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

14/03 2018

1.3.2

1.3.2.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

06/03 2018

1.3.1

1.3.1.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

05/03 2018

1.3.0

1.3.0.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

05/03 2018

1.2.14

1.2.14.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

19/02 2018

1.2.13

1.2.13.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/02 2018

1.2.10

1.2.10.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/02 2018

1.2.11

1.2.11.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/02 2018

1.2.12

1.2.12.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/02 2018

1.2.8

1.2.8.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/02 2018

1.2.7

1.2.7.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/02 2018

1.2.6

1.2.6.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/02 2018

1.2.5

1.2.5.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

13/02 2018

1.2.4

1.2.4.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

11/02 2018

1.2.3

1.2.3.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

11/02 2018

1.2.1

1.2.1.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy

11/02 2018

1.2.0

1.2.0.0

A library for WordPress plugins, to utilize license verification and auto-updating using WordPress License Server.

  Sources   Download

MIT

by Lukas Mateffy