Add updater to the Free [PREMIUM-22]
This commit is contained in:
@ -76,6 +76,7 @@ class Initializer {
|
||||
$this->maybeDbUpdate();
|
||||
$this->setupRenderer();
|
||||
$this->setupInstaller();
|
||||
$this->setupUpdater();
|
||||
$this->setupLocalizer();
|
||||
$this->setupMenu();
|
||||
$this->setupAnalytics();
|
||||
@ -144,6 +145,20 @@ class Initializer {
|
||||
$installer->init();
|
||||
}
|
||||
|
||||
function setupUpdater() {
|
||||
$slug = Installer::PREMIUM_PLUGIN_SLUG;
|
||||
$plugin_file = Installer::getPluginFile($slug);
|
||||
if(empty($plugin_file) || !defined('MAILPOET_PREMIUM_VERSION')) {
|
||||
return false;
|
||||
}
|
||||
$updater = new Updater(
|
||||
$plugin_file,
|
||||
$slug,
|
||||
MAILPOET_PREMIUM_VERSION
|
||||
);
|
||||
$updater->init();
|
||||
}
|
||||
|
||||
function setupLocalizer() {
|
||||
$localizer = new Localizer($this->renderer);
|
||||
$localizer->init();
|
||||
|
Reference in New Issue
Block a user