Answer the question
In order to leave comments, you need to log in
Why is the order data not sent by email?
I display order details via email template
<table class="v1td" style="width: 100%; font-family: Roboto, Arial, sans-serif; margin-bottom: 15px; border: 1px solid #969595; color: #636363" cellspacing="0" cellpadding="6" border="1">
<?php
$cart_object = WC()->cart;
// print_r($cart_object);
$posted = false;
foreach($cart_object->cart_contents as $key => $value) {
if(!$posted) {
$data = $value['data']->get_description();
$dat = preg_split("(<br>|<br >|</br>|<br/>|\n)", $data);
foreach($dat as $v) {
$d = explode(':', $v);
if(!$d[0] OR !$d[1])
continue;
echo '
<tbody>
<tr class="v1boost-attribute-option">
<td style="font-weight: bold; padding: 8px; width: 300px">
'.$d[0].':
</td>
<td style="padding: 8px" class="v1boost-attribute-value">
'.$d[1].'
</td>
</tr>
</tbody>';
}
$posted = true;
}
}
?>
</table>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question