From c83f99ab1aeca35c453b2f8c945c5435f43d64f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lys=C3=BD?= Date: Mon, 10 Jan 2022 14:31:11 +0100 Subject: [PATCH] Fix code style of the new code [MAILPOET-3912] --- lib/Segments/SegmentDependencyValidator.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Segments/SegmentDependencyValidator.php b/lib/Segments/SegmentDependencyValidator.php index 189b03ed9b..c25e4c00b3 100644 --- a/lib/Segments/SegmentDependencyValidator.php +++ b/lib/Segments/SegmentDependencyValidator.php @@ -72,7 +72,8 @@ class SegmentDependencyValidator { */ public function getMissingPluginsByAllFilters(Collection $dynamicFilters): array { $missingPluginNames = []; - if (count($dynamicFilters) > 1 + if ( + count($dynamicFilters) > 1 && (!$this->wp->isPluginActive(self::MAILPOET_PREMIUM_PLUGIN['id']) || !$this->subscribersFeature->hasValidPremiumKey() || $this->subscribersFeature->check()) @@ -110,7 +111,8 @@ class SegmentDependencyValidator { } public function getCustomErrorMessage($missingPlugin) { - if ($missingPlugin === self::MAILPOET_PREMIUM_PLUGIN['name'] + if ( + $missingPlugin === self::MAILPOET_PREMIUM_PLUGIN['name'] && $this->wp->isPluginActive(self::MAILPOET_PREMIUM_PLUGIN['id']) && (!$this->subscribersFeature->hasValidPremiumKey() || $this->subscribersFeature->check()) ) {