add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_tax_show_rules', 10, 2 );
function wpo_wcpdf_tax_show_rules ($template_type, $order) {
if ( $order->get_total_tax() > 0 ) {
?>
<!-- Termina php-->
<style>
body > table.order-details > tbody > tr > td.vat,
body > table.order-details > thead > tr > th.vat,
body > table.order-details > thead > tr > th.tax_rate,
body > table.order-details > tbody > tr > td.tax_rate,
body > table.notes-totals > tbody > tr > td.no-borders.totals-cell > table > tfoot > tr.tax-line.first.last {
display:table-cell;
}
</style>
<!-- Comienza php-->
<?php
} else if ( $order->get_total_tax() == 0 ) {
?>
<!-- Termina php-->
<style>
body > table.order-details > tbody > tr > td.vat,
body > table.order-details > thead > tr > th.vat,
body > table.order-details > thead > tr > th.tax_rate,
body > table.order-details > tbody > tr > td.tax_rate,
body > table.notes-totals > tbody > tr > td.no-borders.totals-cell > table > tfoot > tr.tax-line.first.last {
display:none;
}
</style>
<!-- Comienza php-->
<?php
}
}