Hi. How can we help?

How to show shipments on the invoice

How to display the data for the shipping on the invoice. You can be added in the section of the bill notes with this php code snippets pasted into functions.php

 

if ( ! function_exists( 'yith_ywpi_print_document_notes' ) ) {
function yith_ywpi_print_document_notes( $notes, $document ) {
if ( is_object( $document ) && ! empty( $document->order ) && $document->order instanceof WC_Order ) {
$order = $document->order;
$shipping_info = sprintf( '<br><strong>%s:</strong> %s<br><strong>%s:</strong><br>%s', __( 'Shipping Method', 'theme-text-domain' ), $order->get_shipping_method(), __( 'Shipping Address', 'theme-text-domain' ), $order->get_formatted_shipping_address() );
$notes .= $shipping_info;
}
return $notes;
}

add_filter( 'yith_ywpi_print_document_notes', 'yith_ywpi_print_document_notes', 10, 2 );
}
Was this article helpful?
2 out of 4 found this helpful

Back to Help Center >