← All changes
|
back/dynamics/subscription/SubscriptionAutomationTriggers.php
+4
-6
11.0.0
→
11.1.0
View file →
| @@ -13,20 +13,18 @@ | ||
| 13 | 13 | 'user_subscribe' => 'ACYM_WHEN_USER_SUBSCRIBES', |
| 14 | 14 | 'user_unsubscribe' => 'ACYM_WHEN_USER_UNSUBSCRIBES', |
| 15 | 15 | ]; |
| 16 | 16 | |
| 17 | - public function onAcymDeclareTriggers(&$triggers, &$defaultValues) | |
| 17 | + protected function initAutomationTriggers(): void | |
| 18 | 18 | { |
| 19 | 19 | foreach ($this->triggers as $key => $name) { |
| 20 | - $triggers['user'][$key] = new stdClass(); | |
| 21 | - $triggers['user'][$key]->name = '<div class="cell shrink">'.acym_translation($name).'</div>'; | |
| 22 | - $triggers['user'][$key]->option = '<input type="hidden" name="[triggers][user]['.$key.'][]" value="">'; | |
| 20 | + $this->automationTriggers['user'][$key] = acym_translation($name); | |
| 23 | 21 | } |
| 24 | 22 | } |
| 25 | 23 | |
| 26 | - public function onAcymDeclareTriggersScenario(&$triggers, &$defaultValues) | |
| 24 | + public function displayTriggerOptions(string $fieldName): void | |
| 27 | 25 | { |
| 28 | - $this->onAcymDeclareTriggers($triggers, $defaultValues); | |
| 26 | + echo '<input type="hidden" name="'.esc_attr($fieldName.'[]').'" value="">'; | |
| 29 | 27 | } |
| 30 | 28 | |
| 31 | 29 | public function onAcymExecuteTrigger(&$step, &$execute, &$data) |
| 32 | 30 | { |