PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
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
← All changes | back/Controllers/Automations/Summary.php +36 -0 11.1.1 → 11.1.0 View file →
@@ -1,0 +1,36 @@
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 + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token');
24 +
25 + $automationClass = new AutomationClass();
26 + $automation = $automationClass->getOneById(acym_getVar('int', 'id'));
27 + $automation->active = 1;
28 + $automationId = $automationClass->save($automation);
29 + if (!empty($automationId)) {
30 + acym_enqueueMessage(acym_translation('ACYM_SUCCESSFULLY_SAVED'));
31 + } else {
32 + acym_enqueueMessage(acym_translation('ACYM_ERROR_SAVING'), 'error');
33 + }
34 + $this->listing();
35 + }
36 +}