Title: Custom field
Last modified: August 31, 2016

---

# Custom field

 *  Resolved [2CAN](https://wordpress.org/support/users/2can/)
 * (@2can)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-field-52/)
 * Hi, i added a custom field with WooCommerce Checkout Manager
    The field label
   is “P.IVA / Codice Fiscale” and abbreviation is “myfield5”.
 * I need to add this field into invoice.php
 * i added
 * <?php $wpo_wcpdf->custom_field(‘P.IVA / Codice Fiscale’, ‘P.IVA/Codice Fiscale:’,
   true); ?>
 * This code display the label but not the value.
    i tried to use “myfield5” or “
   billing_myfield5” instead “P.IVA / Codice Fiscale” but the value is not showed(
   the custom field is filled).
 * can you help me? Thank’s
 * [https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)

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

 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-field-52/#post-7124415)
 * Hi! According to their [FAQ](https://wordpress.org/plugins/woocommerce-checkout-manager/faq/),
   it should be:
 *     ```
       <?php $wpo_wcpdf->custom_field('myfield5', 'P.IVA / Codice Fiscale'); ?>
       ```
   
 * Hope that helps!
    Ewout
 *  Thread Starter [2CAN](https://wordpress.org/support/users/2can/)
 * (@2can)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-field-52/#post-7124418)
 * 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](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-field-52/#post-7124419)
 * That’s strange! You could try ‘_billing_myfield5’ or ‘_myfield5’ if the field
   is hidden. Or install the [WooCommerce Store Toolkit](https://wordpress.org/plugins/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](https://wordpress.org/support/users/2can/)
 * (@2can)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-field-52/#post-7124421)
 * great! it’s work with _billing_myfield5
 * i dont’ know why, it is not an hidden field.
 * anyway, thankyou
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/custom-field-52/#post-7124434)
 * 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 🙂
 *  [Socialbeings](https://wordpress.org/support/users/socialbeings/)
 * (@socialbeings)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/custom-field-52/#post-7124663)
 * 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](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/custom-field-52/#post-7124664)
 * 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](http://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/creating-a-custom-pdf-template/)).
   However, I recommend using action hooks in combination with Code Snippets instead,
   as this is less work:
    [Displaying a custom field](http://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/displaying-a-custom-field/).
 * Hope that helps!
    Ewout
 *  [Socialbeings](https://wordpress.org/support/users/socialbeings/)
 * (@socialbeings)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/custom-field-52/#post-7124665)
 * Thank you very much for your help Ewout.
    A greeting.

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

The topic ‘Custom field’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [Socialbeings](https://wordpress.org/support/users/socialbeings/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/custom-field-52/#post-7124665)
 * Status: resolved