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/dynamics/subscriber/plugin.php +20 -7 10.2.2 → 11.1.0 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +defined('ABSPATH') || die('Restricted Access');
2 3
3 4 use AcyMailing\Helpers\ExportHelper;
4 5 use AcyMailing\Core\AcymPlugin;
5 6 use AcyMailing\Classes\UserClass;
@@ -21,9 +22,11 @@
21 22 use SubscriberAutomationActions;
22 23 use SubscriberFollowup;
23 24 use SubscriberInsertion;
24 25
25 - private string $followTriggerName = 'user_creation';
26 + const FOLLOWUP_USER_CREATION = 'user_creation';
27 + const FOLLOWUP_USER_CONFIRMATION = 'user_confirmation';
28 +
26 29 private array $triggerMail = ['user_click', 'user_open'];
27 30 private array $triggers = [
28 31 'user_creation' => 'ACYM_ON_USER_CREATION',
29 32 'user_modification' => 'ACYM_ON_USER_MODIFICATION',
@@ -73,21 +76,31 @@
73 76
74 77 public function onBeforeSaveConfigFields(&$newConfig)
75 78 {
76 79 $fieldToExportOnChange = $this->config->get('export_data_changes_fields', []);
77 - if (empty($fieldToExportOnChange)) return;
80 + if (empty($fieldToExportOnChange)) {
81 + return;
82 + }
78 83
79 - if (!is_array($fieldToExportOnChange)) $fieldToExportOnChange = explode(',', $fieldToExportOnChange);
84 + if (!is_array($fieldToExportOnChange)) {
85 + $fieldToExportOnChange = explode(',', $fieldToExportOnChange);
86 + }
80 87
81 - if (empty($newConfig['export_data_changes_fields'])) $newConfig['export_data_changes_fields'] = [];
88 + if (empty($newConfig['export_data_changes_fields'])) {
89 + $newConfig['export_data_changes_fields'] = [];
90 + }
82 91
83 - if ($fieldToExportOnChange == $newConfig['export_data_changes_fields']) return;
92 + if ($fieldToExportOnChange == $newConfig['export_data_changes_fields']) {
93 + return;
94 + }
84 95
85 96 $exportHelper = new ExportHelper();
86 97 $fileExportPath = $exportHelper->getExportChangesFilePath();
87 98
88 - if (!file_exists($fileExportPath)) return;
99 + if (!file_exists($fileExportPath)) {
100 + return;
101 + }
89 102
90 103 $newFilename = $exportHelper->generateExportChangesFilePathConfigChanges();
91 - @rename($fileExportPath, $newFilename);
104 + acym_moveFile($fileExportPath, $newFilename);
92 105 }
93 106 }