diff --git a/mailpoet/lib/Config/Menu.php b/mailpoet/lib/Config/Menu.php index 1eb38033bf..d7bb42a801 100644 --- a/mailpoet/lib/Config/Menu.php +++ b/mailpoet/lib/Config/Menu.php @@ -23,7 +23,6 @@ use MailPoet\AdminPages\Pages\Upgrade; use MailPoet\AdminPages\Pages\WelcomeWizard; use MailPoet\AdminPages\Pages\WooCommerceSetup; use MailPoet\DI\ContainerWrapper; -use MailPoet\Features\FeaturesController; use MailPoet\Form\Util\CustomFonts; use MailPoet\Util\License\License; use MailPoet\WP\Functions as WPFunctions; @@ -78,9 +77,6 @@ class Menu { /** @var CustomFonts */ private $customFonts; - /** @var FeaturesController */ - private $featuresController; - /** @var Changelog */ private $changelog; @@ -91,7 +87,6 @@ class Menu { ContainerWrapper $container, Router $router, CustomFonts $customFonts, - FeaturesController $featuresController, Changelog $changelog ) { $this->accessControl = $accessControl; @@ -100,14 +95,11 @@ class Menu { $this->container = $container; $this->router = $router; $this->customFonts = $customFonts; - $this->featuresController = $featuresController; $this->changelog = $changelog; } public function init() { - if ($this->featuresController->isSupported(FeaturesController::FEATURE_HOMEPAGE)) { - self::$mainPageSlug = self::HOMEPAGE_PAGE_SLUG; - } + self::$mainPageSlug = self::HOMEPAGE_PAGE_SLUG; $this->checkPremiumKey(); $this->wp->addAction( @@ -223,19 +215,17 @@ class Menu { private function registerMailPoetSubMenuEntries(bool $showEntries) { // Homepage - if ($this->featuresController->isSupported(FeaturesController::FEATURE_HOMEPAGE)) { - $this->wp->addSubmenuPage( - $showEntries ? self::$mainPageSlug : true, - $this->setPageTitle(__('Home', 'mailpoet')), - esc_html__('Home', 'mailpoet'), - AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN, - self::HOMEPAGE_PAGE_SLUG, - [ - $this, - 'homepage', - ] - ); - } + $this->wp->addSubmenuPage( + $showEntries ? self::$mainPageSlug : true, + $this->setPageTitle(__('Home', 'mailpoet')), + esc_html__('Home', 'mailpoet'), + AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN, + self::HOMEPAGE_PAGE_SLUG, + [ + $this, + 'homepage', + ] + ); // Emails page $newslettersPage = $this->wp->addSubmenuPage( diff --git a/mailpoet/lib/Features/FeaturesController.php b/mailpoet/lib/Features/FeaturesController.php index 97fa74cb97..b3b6b8b9a9 100644 --- a/mailpoet/lib/Features/FeaturesController.php +++ b/mailpoet/lib/Features/FeaturesController.php @@ -5,13 +5,11 @@ namespace MailPoet\Features; use MailPoetVendor\Doctrine\DBAL\Exception\TableNotFoundException; class FeaturesController { - const FEATURE_HOMEPAGE = 'homepage'; const LANDINGPAGE_AB_TEST_DEBUGGER = 'landingpage_ab_test_debugger'; // Define feature defaults in the array below in the following form: // self::FEATURE_NAME_OF_FEATURE => true, private $defaults = [ - self::FEATURE_HOMEPAGE => false, self::LANDINGPAGE_AB_TEST_DEBUGGER => false, ]; diff --git a/mailpoet/tests/acceptance/Homepage/HomepageBasicsCest.php b/mailpoet/tests/acceptance/Homepage/HomepageBasicsCest.php index f2bb549bc5..d25c579082 100644 --- a/mailpoet/tests/acceptance/Homepage/HomepageBasicsCest.php +++ b/mailpoet/tests/acceptance/Homepage/HomepageBasicsCest.php @@ -3,17 +3,11 @@ namespace MailPoet\Test\Acceptance; use MailPoet\Entities\SubscriberEntity; -use MailPoet\Features\FeaturesController; -use MailPoet\Test\DataFactories\Features; use MailPoet\Test\DataFactories\Segment; use MailPoet\Test\DataFactories\Settings; use MailPoet\Test\DataFactories\Subscriber; class HomepageBasicsCest { - public function _before() { - (new Features())->withFeatureEnabled(FeaturesController::FEATURE_HOMEPAGE); - } - public function homepageRenders(\AcceptanceTester $i) { $i->wantTo('Check homepage renders and is present in menu'); $i->login();