Viewing 3 replies - 1 through 3 (of 3 total)
  • I did not understand your question, I have the following problem, when I go to print, the product additions are missing from printing

    I have the same need to print the Admin Notes with the invoice

    Hi @shawnorecchio,

    Extremely sorry for the delay in response.

    Could you please add the below code in the functions.php file of the active theme to show the admin note in the invoices?

    Code:
    function wcdn_add_admin_notes( $fields, $order ) {
    $new_fields = array();
    $admin_order_notes = wc_get_order_notes( array(
    ‘order_id’ => $order->get_id(),
    ) );
    foreach( $admin_order_notes as $admin_order_note ) {
    if ( ‘admin’ === $admin_order_note->added_by ) {
    $admin_notes[] = $admin_order_note->content;
    }
    }
    if ( $admin_notes ) {
    $new_fields[‘admin_note’] = array(
    ‘label’ => ‘Admin Note’,
    ‘value’ => implode(‘ <br> ‘ , $admin_notes )
    );
    }
    return array_merge( $fields, $new_fields );
    }
    add_filter( ‘wcdn_order_info_fields’, ‘wcdn_add_admin_notes’, 10, 2 );

    Do let us know how it goes.

    Regards,
    Kenil Shah

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

The topic ‘Admin Order Notes’ is closed to new replies.