-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathenwikuna-license-manager-client.php
60 lines (48 loc) · 2.4 KB
/
enwikuna-license-manager-client.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* Plugin Name: Enwikuna License Manager Client
* Description: Will help customers to manage their licenses provided by the Enwikuna License Manager and receive automatic updates via releases.
* Version: 1.0.0
* Author: Enwikuna
* Author URI: https://agency.enwikuna.de
* Plugin URI: https://github.com/enwikuna/enwikuna-license-manager-client
* Text Domain: enwikuna-license-manager-client
* Domain Path: /i18n/languages/
* Requires at least: 5.4.0
* Requires PHP: 7.4.0
* Tested up to: 6.5.2
*
* @package Enwikuna\Enwikuna_License_Manager_Client
*/
defined( 'ABSPATH' ) || exit;
use Enwikuna\Enwikuna_License_Manager_Client\ELMC;
// Needed constants for main class initialization only
if ( ! defined( 'ELMC_PLUGIN_FILE' ) ) {
define( 'ELMC_PLUGIN_FILE', __FILE__ );
}
if ( ! defined( 'ELMC_ABSPATH' ) ) {
define( 'ELMC_ABSPATH', realpath( plugin_dir_path( ELMC_PLUGIN_FILE ) ) . DIRECTORY_SEPARATOR );
}
if ( ! defined( 'ELMC_COMPANY_NAME' ) ) {
define( 'ELMC_COMPANY_NAME', 'You Company' ); // Required: Define your company name here! It will be used in the plugin
}
if ( ! defined( 'ELMC_REST_API_URL' ) ) {
define( 'ELMC_REST_API_URL', 'https://your-page.com/wp-json/elm/v1/' ); // Required: Define your own REST API URL here
}
if ( ! defined( 'ELMC_REST_API_KEY' ) ) {
define( 'ELMC_REST_API_KEY', 'ck_xxx' ); // Required: Define your REST API key here (Enwikuna License Manager > Settings > REST API > Keys)
}
if ( ! defined( 'ELMC_REST_API_SECRET' ) ) {
define( 'ELMC_REST_API_SECRET', 'cs_xxx' ); // Required: Define your REST API secret here (Enwikuna License Manager > Settings > REST API > Keys)
}
if ( ! defined( 'ELMC_PRODUCT_UUID' ) ) {
define( 'ELMC_PRODUCT_UUID', '00000000-0000-0000-0000-000000000000' ); // Required: Define the product UUID of the Enwikuna License Manager Client product here (WooCommerce > Products > Enwikuna License Manager > License > Universally unique identifier (UUID))
}
if ( ! defined( 'ELMC_TRUSTED_SIGNING_KEY' ) ) {
define( 'ELMC_TRUSTED_SIGNING_KEY', '' ); // Optional: Define here the trusted signing key if you want to use signed releases (Enwikuna License Manager > Settings > REST API > Product download public key)
}
// End of needed constants for main class initialization
if ( file_exists( ELMC_ABSPATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php' ) ) {
require ELMC_ABSPATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
}
ELMC::get_instance();