• Resolved jrgndwvr

    (@jrgndwvr)


    Hello

    Until a few weeks ago we were able to show the VAT number of customers (= a custom checkout field) on the pdf invoices. We used this code to achieve that:

    add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_delivery_date', 10, 2 );
    function wpo_wcpdf_delivery_date ($template_type, $order) {
        if ($template_type == 'invoice') {
            $document = wcpdf_get_document( $template_type, $order );
            ?>      
            <tr class="delivery-date">
                <th>Ondernemingsnr:</th>
                <td><?php $document->custom_field('billing_wooccm13'); ?></td>
            </tr>
            <?php
        }
    }

    For some reason the field “billing_woocm13” does not show up any more. The label of that field (“Ondernemingsnr:”) is still on the invoice. So that works. Only the content of that custom field is missing …

    (For testing purposes I replaced the code <?php $document->custom_field(‘billing_wooccm13’); ?> with the word TEST and then it shows “TEST” on the PDF invoice … )

    What can be the reason and how do we solve this?

    Thank you for the support!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom checkout field does not show on PDF any more. (Before it worked fine.)’ is closed to new replies.