• I have been using this plugin in two websites. It has been working like a charm.
    In the footer I placed a table in html. That worked perfectly up until version 4 of the plugin.
    Now the table gets ccorrupted. Has anything changed that made using tables impossible?
    Or are there certain rules that I need to follow.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor dwpriv

    (@dwpriv)

    Could you share a screenshot of how this looks, please?

    Thread Starter 88speedkeys

    (@88speedkeys)

    Plugin Contributor dwpriv

    (@dwpriv)

    I see. Where did you add this table code? In a custom template, or with a code snippet?

    Thread Starter 88speedkeys

    (@88speedkeys)

    Plugin Contributor dwpriv

    (@dwpriv)

    Could you share that code here so that I can test it on my end, please?

    Thread Starter 88speedkeys

    (@88speedkeys)

    <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&nbsp;</strong>706.133.70</td>
    <td><span>Persoonlijke AGB-code&nbsp;</span>90034031</td>
    </tr>
    <tr>
    <td>5232 BR ’s-Hertogenbosch</td>
    <td><strong>BTW&nbsp;</strong>NL8583.944.55.B01</td>
    <td><span>Praktijk AGB-code&nbsp;</span>90065809</td>
    </tr>
    <tr>
    <td><strong>T&nbsp;</strong>073 644 05 85</td>
    <td><span>IBAN&nbsp;</span>NL16TRIO0338575049</td>
    <td><span>SRBAG-code&nbsp;</span>525046</td>
    </tr>
    <tr>
    <td><strong>M&nbsp;</strong>06 51 601 305</td>
    <td><span>BIC/Swiftcode&nbsp;</span>TRIONL2U</td>
    <td><span>VIV registratiecode&nbsp;</span>1907871</td>
    </tr>
    <tr>
    <td><strong>E&nbsp;</strong>info@marcdoomernik.nl</td>
    <td><span>&nbsp;</span></td>
    <td><span>RBCZ licentienummer:&nbsp;</span>505012R</td>
    </tr>
    <tr>
    <td><strong>w&nbsp;</strong>www.marcdoomernik.nl</td>
    <td><span>&nbsp;</span></td>
    <td><span>&nbsp;</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 );
    Thread Starter 88speedkeys

    (@88speedkeys)

    Yes! Added your example as a snippet and removed the <style> from the footer.
    It works, thank you so much.

    Best!
    Marco

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘HTML Table in footer issue since version 4’ is closed to new replies.