non-legacy way of displaying custom billing field
-
Hi,
I need to display an additional custom field in the billing section of the invoice PDF. So far the only code that works is using the deprecated $wpo_wcpdf global, which works in legacy mode:
add_filter( 'wpo_wcpdf_billing_address', 'incluir_nif_en_factura' ); function incluir_nif_en_factura( $address ) { global $wpo_wcpdf; echo $address . '<p>'; $wpo_wcpdf->custom_field( 'billing_nif', 'NIF/DNI/CIF: ' ); echo '</p>'; }
I tried to do it in a new way as the documentation recommends: https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/pdf-template-action-hooks/ But there are no hooks for billing in there.
in
templates/Simple/invoice.php
file, line 33. I see the undocumented actionwpo_wcpdf_after_billing_address
. But so far I’ve been unable to make it display anything. While using other hooks likewpo_wcpdf_after_order_data
does work.Am I missing something? What would be the new way of displaying additional fields on the billing section?
thank you very much for your great plugin (I already bought the Premium Templates add-on BTW)
- The topic ‘non-legacy way of displaying custom billing field’ is closed to new replies.