PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.1
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
← All changes | includes/Core/Util/MailNotifier.php +15 -2 3.2.13.3.1 View file →
@@ -48,9 +48,17 @@
48 48 $mailHeaders[] = "FROM: $headerFromName " . '<' . sanitize_email($fromMail[0]) . '>';
49 49 $from_mail = $fromMail[0];
50 50 }
51 51 (new MailConfig())->sendMail(['from_name' => $from_name, 'from_email' => $from_mail]);
52 - $mailSubject = FieldValueHandler::replaceFieldWithValue($mailTemplate[0]->sub, $fieldValue, $formID);
52 + // Translate before smart-tag replacement. One language per submission,
53 + // shared by the admin and submitter emails.
54 + $mailSubjectTemplate = (string) apply_filters(
55 + 'bitform_translate_form_string',
56 + (string) $mailTemplate[0]->sub,
57 + 'mail-sub-' . $mailTemplateID,
58 + $formID
59 + );
60 + $mailSubject = FieldValueHandler::replaceFieldWithValue($mailSubjectTemplate, $fieldValue, $formID);
53 61
54 62 // allow developers to modify email subject
55 63 $mailSubject = apply_filters(
56 64 'bitform_filter_email_subject',
@@ -63,9 +71,14 @@
63 71 'is_double_optin' => (bool) $isDblOptin,
64 72 ]
65 73 );
66 74
67 - $mailBody = $mailTemplate[0]->body;
75 + $mailBody = (string) apply_filters(
76 + 'bitform_translate_form_string',
77 + (string) $mailTemplate[0]->body,
78 + 'mail-body-' . $mailTemplateID,
79 + $formID
80 + );
68 81 if (class_exists('\BitCode\BitFormPro\Admin\DownloadFile')) {
69 82 $downloadFile = new \BitCode\BitFormPro\Admin\DownloadFile();
70 83 $mailBody = $downloadFile->replacePdfShortCodeToLink($mailBody, $formID, $entryID);
71 84 $mailBody = $downloadFile->replaceShortCodeToPdfPassword($mailBody, $formID, $entryID);