Last active
July 4, 2019 14:54
-
-
Save andykeith/3236240b0d7dec6f7ea23e1a496bca3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class My_WooCommerce_Plugin implements Registerable { | |
const ITEM_ID = 1234; // The Download ID in EDD | |
const NAME = 'My Cool Plugin'; | |
const VERSION = '1.0'; | |
const FILE = __FILE__; | |
private $license_controller; | |
public function __construct() { | |
$this->license_controller = new Plugin_License_Controller( new Premium_Plugin( self::get_plugin_data() ) ); | |
} | |
public function register() { | |
$this->license_controller->register(); | |
} | |
private static function get_plugin_data() { | |
return array( | |
'item_id' => self::ITEM_ID, | |
'name' => self::NAME, | |
'version' => self::VERSION, | |
'file' => self::FILE, | |
'is_woocommerce' => true, | |
'documentation_path' => 'kb-categories/kb-category-example/', | |
'settings_page_path' => 'admin.php?page=wc-settings&tab=products§ion=something' | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment