FormFields
2 years ago
FormTemplate
2 years ago
DonationGoal.php
2 years ago
DonationOptions.php
2 years ago
EmailSettings.php
2 years ago
FeeRecovery.php
2 years ago
FormFeaturedImage.php
2 years ago
FormFieldManager.php
2 years ago
FormFields.php
2 years ago
FormGrid.php
2 years ago
FormMeta.php
2 years ago
FormTitle.php
2 years ago
FundsAndDesignations.php
2 years ago
GiftAid.php
2 years ago
Mailchimp.php
2 years ago
MigrateMeta.php
2 years ago
OfflineDonations.php
2 years ago
PaymentGateways.php
2 years ago
PdfSettings.php
2 years ago
PerFormGateways.php
2 years ago
RecurringDonationOptions.php
2 years ago
TermsAndConditions.php
2 years ago
EmailSettings.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\FormMigration\Steps; |
| 4 | |
| 5 | use Give\FormMigration\Contracts\FormMigrationStep; |
| 6 | |
| 7 | class EmailSettings extends FormMigrationStep |
| 8 | { |
| 9 | public function process() |
| 10 | { |
| 11 | $this->formV3->settings->emailOptionsStatus = $this->formV2->getEmailOptionsStatus(); |
| 12 | $this->formV3->settings->emailTemplate = $this->formV2->getEmailTemplate(); |
| 13 | $this->formV3->settings->emailLogo = $this->formV2->getEmailLogo(); |
| 14 | $this->formV3->settings->emailFromName = $this->formV2->getEmailFromName(); |
| 15 | $this->formV3->settings->emailFromEmail = $this->formV2->getEmailFromEmail(); |
| 16 | |
| 17 | $notifications = \Give_Email_Notifications::get_instance()->get_email_notifications(); |
| 18 | foreach($notifications as $notification) { |
| 19 | $this->formV3->settings->emailTemplateOptions[ $notification->config['id'] ] = [ |
| 20 | 'status' => $notification->get_notification_status($this->formV2->id), |
| 21 | 'email_subject' => $notification->get_email_subject($this->formV2->id), |
| 22 | 'email_header' => $notification->get_email_header($this->formV2->id), |
| 23 | 'email_message' => str_replace( |
| 24 | ['"“', '"”', '“"', '”"', '“', '”'], |
| 25 | '"', |
| 26 | $notification->get_email_message($this->formV2->id) |
| 27 | ), |
| 28 | 'email_content_type' => $notification->get_email_content_type($this->formV2->id), |
| 29 | 'recipient' => (array) $notification->get_recipient($this->formV2->id) |
| 30 | ]; |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 |