Compare commits

...

4 Commits

Author SHA1 Message Date
26a5ee2f56 Release 4.5.2 2023-01-25 11:05:34 -03:00
04770e4e9e Hide Automations and Upgrade in landingpage
[MAILPOET-5019]
2023-01-25 11:04:34 -03:00
a572b0dea2 Add mailpoet-landingpage to avoid redirection
[MAILPOET-5019]
2023-01-25 11:04:25 -03:00
806b5cfb14 Hide menu entries when not setup yet
[MAILPOET-5019]
2023-01-25 11:04:18 -03:00
4 changed files with 22 additions and 20 deletions

View File

@ -139,6 +139,7 @@ class Changelog {
'mailpoet-woocommerce-setup',
'mailpoet-welcome-wizard',
'mailpoet-migration',
'mailpoet-landingpage',
]
)
&& $this->shouldShowWooCommerceListImportPage()
@ -156,6 +157,7 @@ class Changelog {
'mailpoet-woocommerce-setup',
'mailpoet-welcome-wizard',
'mailpoet-migration',
'mailpoet-landingpage',
]
)
&& $this->shouldShowRevenueTrackingPermissionPage()

View File

@ -218,17 +218,14 @@ class Menu {
]
);
// Hide sub-menu entries if the user still needs to complete the Welcome Wizard
if (!$this->changelog->shouldShowWelcomeWizard()) {
$this->registerMailPoetSubMenuEntries();
}
$this->registerMailPoetSubMenuEntries(!$this->changelog->shouldShowWelcomeWizard());
}
private function registerMailPoetSubMenuEntries() {
private function registerMailPoetSubMenuEntries(bool $showEntries) {
// Homepage
if ($this->featuresController->isSupported(FeaturesController::FEATURE_HOMEPAGE)) {
$this->wp->addSubmenuPage(
self::$mainPageSlug,
$showEntries ? self::$mainPageSlug : true,
$this->setPageTitle(__('Home', 'mailpoet')),
esc_html__('Home', 'mailpoet'),
AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
@ -242,7 +239,7 @@ class Menu {
// Emails page
$newslettersPage = $this->wp->addSubmenuPage(
self::$mainPageSlug,
$showEntries ? self::$mainPageSlug : true,
$this->setPageTitle(__('Emails', 'mailpoet')),
esc_html__('Emails', 'mailpoet'),
AccessControl::PERMISSION_MANAGE_EMAILS,
@ -278,11 +275,11 @@ class Menu {
]
);
$this->registerAutomationMenu();
$this->registerAutomationMenu($showEntries);
// Forms page
$formsPage = $this->wp->addSubmenuPage(
self::$mainPageSlug,
$showEntries ? self::$mainPageSlug : true,
$this->setPageTitle(__('Forms', 'mailpoet')),
esc_html__('Forms', 'mailpoet'),
AccessControl::PERMISSION_MANAGE_FORMS,
@ -348,7 +345,7 @@ class Menu {
// Subscribers page
$subscribersPage = $this->wp->addSubmenuPage(
self::$mainPageSlug,
$showEntries ? self::$mainPageSlug : true,
$this->setPageTitle(__('Subscribers', 'mailpoet')),
esc_html__('Subscribers', 'mailpoet'),
AccessControl::PERMISSION_MANAGE_SUBSCRIBERS,
@ -386,7 +383,7 @@ class Menu {
// export
$this->wp->addSubmenuPage(
true,
$showEntries ? self::$mainPageSlug : true,
$this->setPageTitle(__('Export', 'mailpoet')),
esc_html__('Export', 'mailpoet'),
AccessControl::PERMISSION_MANAGE_SUBSCRIBERS,
@ -399,7 +396,7 @@ class Menu {
// Segments page
$segmentsPage = $this->wp->addSubmenuPage(
self::$mainPageSlug,
$showEntries ? self::$mainPageSlug : true,
$this->setPageTitle(__('Lists', 'mailpoet')),
esc_html__('Lists', 'mailpoet'),
AccessControl::PERMISSION_MANAGE_SEGMENTS,
@ -424,7 +421,7 @@ class Menu {
// Settings page
$this->wp->addSubmenuPage(
self::$mainPageSlug,
$showEntries ? self::$mainPageSlug : true,
$this->setPageTitle(__('Settings', 'mailpoet')),
esc_html__('Settings', 'mailpoet'),
AccessControl::PERMISSION_MANAGE_SETTINGS,
@ -437,7 +434,7 @@ class Menu {
// Help page
$this->wp->addSubmenuPage(
self::$mainPageSlug,
$showEntries ? self::$mainPageSlug : true,
$this->setPageTitle(__('Help', 'mailpoet')),
esc_html__('Help', 'mailpoet'),
AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
@ -451,7 +448,7 @@ class Menu {
// Upgrade page
// Only show this page in menu if the Premium plugin is not activated
$this->wp->addSubmenuPage(
License::getLicense() ? true : self::$mainPageSlug,
License::getLicense() || !$showEntries ? true : self::$mainPageSlug,
$this->setPageTitle(__('Upgrade', 'mailpoet')),
esc_html__('Upgrade', 'mailpoet'),
AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN,
@ -496,9 +493,9 @@ class Menu {
);
}
private function registerAutomationMenu() {
private function registerAutomationMenu(bool $showEntries) {
$automationPage = $this->wp->addSubmenuPage(
self::$mainPageSlug,
$showEntries ? self::$mainPageSlug : true,
$this->setPageTitle(__('Automations', 'mailpoet')),
// @ToDo Remove Beta once Automation is no longer beta.
'<span>' . esc_html__('Automations', 'mailpoet') . '</span><span class="mailpoet-beta-badge">Beta</span>',

View File

@ -2,7 +2,7 @@
/*
* Plugin Name: MailPoet
* Version: 4.5.1
* Version: 4.5.2
* Plugin URI: https://www.mailpoet.com
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
* Author: MailPoet
@ -20,7 +20,7 @@
*/
$mailpoetPlugin = [
'version' => '4.5.1',
'version' => '4.5.2',
'filename' => __FILE__,
'path' => dirname(__FILE__),
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',

View File

@ -3,7 +3,7 @@ Contributors: mailpoet
Tags: email, email marketing, post notification, woocommerce emails, email automation, newsletter, newsletter builder, newsletter subscribers
Requires at least: 5.8
Tested up to: 6.1
Stable tag: 4.5.1
Stable tag: 4.5.2
Requires PHP: 7.2
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
@ -219,6 +219,9 @@ Check our [Knowledge Base](https://kb.mailpoet.com) or contact us through our [s
== Changelog ==
= 4.5.2 - 2023-01-25 =
* Fixed: issue with new installations of MailPoet on websites with WooCommerce.
= 4.5.1 - 2023-01-23 =
* Added: a new landing page to explain MailPoet to new users;
* Added: survey when the plugin is deactivated.