Plugin Contributor
Ewout
(@pomegranate)
Hi! According to their FAQ, it should be:
<?php $wpo_wcpdf->custom_field('myfield5', 'P.IVA / Codice Fiscale'); ?>
Hope that helps!
Ewout
Thread Starter
2CAN
(@2can)
I had already tried but it does not work.
I tried also “billing_myfield5” that is the id of field. does not work.
any suggestion?
Thank you
Plugin Contributor
Ewout
(@pomegranate)
That’s strange! You could try ‘_billing_myfield5’ or ‘_myfield5’ if the field is hidden. Or install the WooCommerce Store Toolkit which will list all the custom fields at the bottom of the order page (the meta key is printed in bold there)
Let me know what you find!
Thread Starter
2CAN
(@2can)
great! it’s work with _billing_myfield5
i dont’ know why, it is not an hidden field.
anyway, thankyou
Plugin Contributor
Ewout
(@pomegranate)
any field in WordPress that has a leading underscore is hidden by default in the ‘Custom Fields’ Meta Box. This allows plugins to present it under a different name than the meta key (so P.IVA / Codice Fiscale instead of _billing_myfield5 in your case), which is probably why it’s not hidden for you.
Glad to hear it’s resolved 🙂
Good morning, please Could you tell me which file should add the code:
<? Php $ wpo_wcpdf-> custom_field (‘myfld1’, ‘NIF’); ?>
for my custom field appears on the pdf invoice?
Thank you very much.
Plugin Contributor
Ewout
(@pomegranate)
Hi! You insert that in the template you want this to appear in, either invoice.php or packing-slip.php. Before you do this, you have to copy these files to your child theme (instructions here). However, I recommend using action hooks in combination with Code Snippets instead, as this is less work:
Displaying a custom field.
Hope that helps!
Ewout
Thank you very much for your help Ewout.
A greeting.