Plugin Contributor
dwpriv
(@dwpriv)
Could you share a screenshot of how this looks, please?
Plugin Contributor
dwpriv
(@dwpriv)
I see. Where did you add this table code? In a custom template, or with a code snippet?
Plugin Contributor
dwpriv
(@dwpriv)
Could you share that code here so that I can test it on my end, please?
<style type="text/css">
table.invoice-footer-table {
font-family: sans-serif;
font-size:10px;
background: #4c9a2a;
border: none;
width: 100%;
color: white;
padding: 10px;
}
table.invoice-footer-table tr{
width: 100%;
}
table.invoice-footer-table tr td{
text-align: left;
width: 33.33%;
}
table.invoice-footer-table tr td span{
font-weight: 700;
}
</style><table class="invoice-footer-table">
<tr>
<td class="tg-yw4l">Ploegweg 9</td>
<td><strong>KVK </strong>706.133.70</td>
<td><span>Persoonlijke AGB-code </span>90034031</td>
</tr>
<tr>
<td>5232 BR ’s-Hertogenbosch</td>
<td><strong>BTW </strong>NL8583.944.55.B01</td>
<td><span>Praktijk AGB-code </span>90065809</td>
</tr>
<tr>
<td><strong>T </strong>073 644 05 85</td>
<td><span>IBAN </span>NL16TRIO0338575049</td>
<td><span>SRBAG-code </span>525046</td>
</tr>
<tr>
<td><strong>M </strong>06 51 601 305</td>
<td><span>BIC/Swiftcode </span>TRIONL2U</td>
<td><span>VIV registratiecode </span>1907871</td>
</tr>
<tr>
<td><strong>E </strong>info@marcdoomernik.nl</td>
<td><span> </span></td>
<td><span>RBCZ licentienummer: </span>505012R</td>
</tr>
<tr>
<td><strong>w </strong>www.marcdoomernik.nl</td>
<td><span> </span></td>
<td><span> </span></td>
</tr>
</table>
Plugin Contributor
dwpriv
(@dwpriv)
@88speedkeys
Apologies for the late reply.
The issue is that the footer field is intended for text or markup only. In addition, <style> tags are strip out by the wp_kses_post() method, and so your table has no style. You can use other approaches to apply the style, such as the custom style action (wpo_wcpdf_custom_styles). Here’s an example snippet
/**
* Add table styles
*/
add_action( 'wpo_wcpdf_custom_styles', function( $document_type, $document ) {
?>
table.invoice-footer-table {
font-family: sans-serif;
font-size:10px;
background: #4c9a2a;
border: none;
width: 100%;
color: white;
padding: 10px;
}
table.invoice-footer-table tr{
width: 100%;
}
table.invoice-footer-table tr td{
text-align: left;
width: 33.33%;
}
table.invoice-footer-table tr td span{
font-weight: 700;
}
<?php
}, 10 , 2 );
Yes! Added your example as a snippet and removed the <style> from the footer.
It works, thank you so much.
Best!
Marco