Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OrderEmailNotifier.php for SS5 #807

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update OrderEmailNotifier.php for SS5
Changed the debug function to be compatible with symfony/mailer
AntonyThorpe authored Dec 5, 2023
commit 0734a2265d7754b881e14fd2bd82b89c41e0352c
10 changes: 6 additions & 4 deletions src/Checkout/OrderEmailNotifier.php
Original file line number Diff line number Diff line change
@@ -269,12 +269,14 @@ public function sendStatusChange($title, $note = null)
*/
protected function debug(Email $email)
{
$email->render();
$htmlTemplate = $email->getHTMLTemplate();
$htmlRender = $email->getData()->renderWith($htmlTemplate)->RAW();
$template = $email->getHTMLTemplate();
$headers = $email->getSwiftMessage()->getHeaders()->toString();

$headers = $email->getHeaders()->toString();
return "<h2>Email HTML template: $template</h2>\n" .
"<h3>Headers</h3>" .
"<pre>$headers</pre>" .
$email->getBody();
"<h3>Body</h3>" .
$htmlRender;
}
}