Custom Field billing_nif No Longer Displayed on Invoice After Latest Updates

[ad_1]

Hello,

I’ve been using a custom field, billing_nif, in WooCommerce to display the tax ID number on invoices generated by your plugin. To achieve this, I implemented the following code on my site:

add_filter( 'wpo_wcpdf_billing_address', 'include_nif_on_invoice', 99, 2 );
function include_nif_on_invoice( $address, $document = null ) {
if (!empty($document->order) && $nif = $document->get_custom_field('billing_nif') ) {
$address = $address . "<p>NIF/DNI/CIF: {$nif}</p>";
}
return $address;
}

However, at some point after recent updates, the billing_nif field stopped displaying on the invoice. I’m not entirely sure when this issue began. Could you please assist me in resolving this so that the customer’s tax ID (CIF) will appear correctly on the invoices again?

Thank you very much for your support.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer