Require Premium plugin for multi-condition segments

[MAILPOET-3929]
This commit is contained in:
wxa
2021-12-06 18:08:31 +03:00
committed by Veljko V
parent bde9eb1761
commit 5e486462c0
6 changed files with 75 additions and 9 deletions

View File

@@ -93,10 +93,12 @@ class DynamicSegmentsResponseBuilder {
if ($missingPlugins) {
$missingPlugin = reset($missingPlugins);
$data['is_plugin_missing'] = true;
$data['missing_plugin_message'] = sprintf(
__('Activate the %s plugin to see the number of subscribers and enable the editing of this segment.', 'mailpoet'),
$missingPlugin
);
$data['missing_plugin_message'] = $this->segmentDependencyValidator->getCustomErrorMessage($missingPlugin)
?:
sprintf(
__('Activate the %s plugin to see the number of subscribers and enable the editing of this segment.', 'mailpoet'),
$missingPlugin
);
} else {
$data['is_plugin_missing'] = false;
$data['missing_plugin_message'] = null;