PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 10.1.4
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v10.1.4
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / back / Controllers / Automations / Summary.php

Summary.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 10.1.4, at back/Controllers/Automations/Summary.php

36 lines 1017 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace AcyMailing\Controllers\Automations;
4
5 use AcyMailing\Classes\ActionClass;
6 use AcyMailing\Classes\AutomationClass;
7 use AcyMailing\Classes\ConditionClass;
8 use AcyMailing\Classes\StepClass;
9 use AcyMailing\Helpers\WorkflowHelper;
10
11 trait Summary
12 {
13 public function summary(): void
14 {
15
16 if (!acym_level(ACYM_ENTERPRISE)) {
17 acym_redirect(acym_completeLink('dashboard&task=upgrade&version=enterprise', false, true));
18 }
19 }
20
21 public function activeAutomation(): void
22 {
23 $automationClass = new AutomationClass();
24 $automation = $automationClass->getOneById(acym_getVar('int', 'id'));
25 $automation->active = 1;
26 $saved = $automationClass->save($automation);
27 if (!empty($saved)) {
28 acym_enqueueMessage(acym_translation('ACYM_SUCCESSFULLY_SAVED'));
29 $this->listing();
30 } else {
31 acym_enqueueMessage(acym_translation('ACYM_ERROR_SAVING'), 'error');
32 $this->listing();
33 }
34 }
35 }
36