Skip to content

AppCheap/License

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Appcheap Client Library for Licensing and Update Wordpress Plugin

Requirements

Installation

You can use Composer or simply Download the Release

Composer

The preferred method is via composer. Follow the installation instructions if you do not already have composer installed.

Once composer is installed, execute the following command in your project root to install this library:

composer require appcheap/license:^1.0

Finally, autoloader library in your main plugin file like this:

require_once __DIR__ . '/vendor/autoload.php';

Usage

Initialize the client

$client = new Appcheap\Client([
    'identify' => 'app-builder',
    'base_uri' => 'https://verify.appcheap.io/api/v1',
    'plugin_file' => __FILE__,
]);

Plugin update

$plugin = new Appcheap\Plugin($client);
$plugin->run();

Register license page

$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',
	)
);