Make welcome wizard check public

[MAILPOET-4042]
This commit is contained in:
Ján Mikláš
2021-12-28 11:46:23 +01:00
committed by Veljko V
parent 7fd40fb7b6
commit 37fa9203a2

View File

@@ -77,6 +77,13 @@ class Changelog {
$this->checkRevenueTrackingPermissionPage();
}
public function shouldShowWelcomeWizard() {
if ($this->wp->applyFilters('mailpoet_skip_welcome_wizard', false)) {
return false;
}
return $this->settings->get('version') === null;
}
public function isMp2MigrationInProgress() {
return $this->mp2Migrator->isMigrationStartedAndNotCompleted();
}
@@ -101,8 +108,7 @@ class Changelog {
}
private function checkWelcomeWizard() {
$skipWizard = $this->wp->applyFilters('mailpoet_skip_welcome_wizard', false);
if (!$skipWizard) {
if ($this->shouldShowWelcomeWizard()) {
$this->terminateWithRedirect($this->wp->adminUrl('admin.php?page=mailpoet-welcome-wizard'));
}
}