Title: Add extra fields
Last modified: July 1, 2021

---

# Add extra fields

 *  [anadavosagency](https://wordpress.org/support/users/anadavosagency/)
 * (@anadavosagency)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/add-extra-fields-5/)
 * Hi,
    I need to add some extra fields to the invoice. I sow into another comment
   that you gave a code: `add_filter( ‘wcdn_order_info_fields’, ‘wcdn_order_info_fields_function’,
   10, 2 ); public static function wcdn_order_info_fields_function( $fields, $order){
   $new_fields = array();
 *  $locations_label = “Your Custom label”;
    $output = “Your custom data which you
   want to output”; $new_fields[ $locations_label ] = array( ‘label’ => $locations_label,‘
   value’ => $output );
 *  return array_merge( $fields, $new_fields );
    }
 * But it did not work. The site crashed.
    Can you help me? This is the website:
   [https://etupperware.ro/](https://etupperware.ro/) And the fields I need to add
   are above “Recomandat de” : “Nume” and “oras”

Viewing 1 replies (of 1 total)

 *  Plugin Support [Upendra Kapse](https://wordpress.org/support/users/wpupen/)
 * (@wpupen)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/add-extra-fields-5/#post-14708489)
 * Hello [@anadavosagency](https://wordpress.org/support/users/anadavosagency/),
 * Apologies for the delay in getting back to you on this.
 * This was an example code snippet that will require changes in it based on which
   custom field you want to add to the Invoice. Did you make the relevant changes
   in the above example code snippet to fetch your custom field?
 * If yes, can you please share the code snippet that you have added and also share
   the error you get when the site crashes? You will be able to find the error in
   the error log file on your server or you may have received an email on your admin
   email address too which will have the exact fatal error due to which the site
   got crashed. I am guessing there could be some syntax error in your custom function.
 * Kind Regards,
    Upendra.

Viewing 1 replies (of 1 total)

The topic ‘Add extra fields’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Upendra Kapse](https://wordpress.org/support/users/wpupen/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/add-extra-fields-5/#post-14708489)
 * Status: not resolved