Ok, thanks, now it’s better. I also use snippet to get notes to invoice and packing slip. I need to get “Serial number” not “Notes”. With code I get it right to packing slip, be cause code change “Note” to “Serial number”. But I like to have “notes” changed to invoice too, so code must be in original code then? It would be much better to have snippet for this, so updates don’t change it and I can use snippet in other WP installations too. So invoice notes name should be “Serial number”.
/**
* WooCommerce PDF Invoices & Packing Slips:
* Show the invoice notes on packing slips too
*/
add_action( 'wpo_wcpdf_before_customer_notes', function( $document_type, $order ) {
if ( $document_type == 'packing-slip' ) {
$document = wcpdf_get_document( 'invoice', $order );
if ( $document && $document->exists() ) {
?>
<div class="notes">
<h3>Serial number:</h3>
<?php echo $document->document_notes(); ?>
</div>
<?php
}
}
}, 10, 2 );