Support » Plugin: Print Invoice & Delivery Notes for WooCommerce » Additional fields in the print

  • Resolved dadim

    (@dadim)


    I created additional fields with Checkout manager. is it possible to add fields in the printout?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support kenil802

    (@kenil802)

    Hi @dadim,

    Sorry for the delay in response.

    Can you please add the below code in the functions.php file of your currently active theme and check whether it is working fine or not.

    /**
    * Add this code snippet in functions.php file of your currently active theme.
    * An example that adds a ‘VAT’ and ‘Customer Number’ field to the end of the list.
    */
    function example_custom_order_fields( $fields, $order ) {
    $new_fields = array();
    if( get_post_meta( $order->id, ‘your_meta_field_name’, true ) ) {
    $new_fields[‘your_meta_field_name’] = array(
    ‘label’ => ‘VAT’,
    ‘value’ => get_post_meta( $order->id, ‘your_meta_field_name’, true )
    );
    }
    if( get_post_meta( $order->id, ‘your_meta_field_name’, true ) ) {
    $new_fields[‘your_meta_field_name’] = array(
    ‘label’ => ‘Customer Number’,
    ‘value’ => get_post_meta( $order->id, ‘your_meta_field_name’, true )
    );
    }
    return array_merge( $fields, $new_fields );
    }
    add_filter( ‘wcdn_order_info_fields’, ‘example_custom_order_fields’, 10, 2 );

    Please let us know how it goes.

    Regards,
    Kenil Shah

    Hi Support,

    Can I change the “wcdn_address_billing” for adding on the email address&phone number on billing address section?

    Thanks.

    mpassos

    (@mpassos)

    This snippet does not work for me

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.