• Resolved cris123pp

    (@cris123pp)


    Hi, how could I add customer notes to the invoice using the code you provide? I tried changing the code you provide to add an extra field on the invoice, the field “your_meta_field_name” to “customer_note”, but this field does not appear on the invoice. Thank you

    function example_custom_order_fields( $fields, $order ) {
    $new_fields = array();

    if( get_post_meta( $order->id, ‘customer_note’, true ) ) {
    $new_fields[‘customer_note’] = array(
    ‘label’ => ‘VAT’,
    ‘value’ => get_post_meta( $order->id, ‘customer_note’, true )
    );
    }

    return array_merge( $fields, $new_fields );
    }
    add_filter( ‘wcdn_order_info_fields’, ‘example_custom_order_fields’, 10, 2 );

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

    (@kenil802)

    Hi @cris123pp,

    I will ask the developer regarding your query and get back to you with an update.

    Regards,
    Kenil shah

    Plugin Support kenil802

    (@kenil802)

    Hi @cris123pp,

    Sorry for the delay in response.

    The code which you have shared will work only if the custom fields which you are adding are the meta field. So can you check if the field which you are adding is a meta field and if they are meta fields kindly check that the meta key which is used in the code is correct or not?

    Please do let us know.

    Regards,
    Kenil Shah

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add customer notes to invoice’ is closed to new replies.