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/Partial/forms/tracking_consent.php +3 -2 11.0.0 → 11.1.0 View file →
@@ -7,13 +7,14 @@
7 7 if (($form->settings['termspolicy']['tracking_consent'] ?? 'no') !== 'yes') {
8 8 return;
9 9 }
10 10
11 +$trackingChecked = false;
11 12 $currentEmail = acym_currentUserEmail();
12 13 if (!empty($currentEmail)) {
13 14 $existingUser = (new UserClass())->getOneByEmail($currentEmail);
14 15 if (!empty($existingUser->id)) {
15 - return;
16 + $trackingChecked = (int)$existingUser->tracking === 1;
16 17 }
17 18 }
18 19
19 20 echo '<div class="onefield fieldacytracking" id="field_tracking_'.esc_attr($form->form_tag_name).'">';
@@ -18,9 +19,9 @@
18 19
19 20 echo '<div class="onefield fieldacytracking" id="field_tracking_'.esc_attr($form->form_tag_name).'">';
20 21 echo '<label for="mailingdata_tracking_'.esc_attr($form->form_tag_name).'">';
21 22 echo '<input type="hidden" name="user[tracking]" value="0"/>';
22 -echo '<input id="mailingdata_tracking_'.esc_attr($form->form_tag_name).'" class="checkbox" type="checkbox" name="user[tracking]" value="1"/> '.esc_html(
23 +echo '<input id="mailingdata_tracking_'.esc_attr($form->form_tag_name).'" class="checkbox" type="checkbox" name="user[tracking]" value="1" '.checked($trackingChecked, true, false).'/> '.esc_html(
23 24 acym_translation('ACYM_TRACKING_CONSENT')
24 25 );
25 26 echo '</label>';
26 27 echo '</div>';