Displaying order notes

There’s two ways of displaying order notes: in a custom template (for full control over the exact position), or by adding some code to your themes functions.php

First, you need to create a custom template by following instructions here: Creating a custom PDF template.

Then place the following snippet where you would like the order notes to appear:

<?php $this->order_notes(); ?>

to display only private notes:

<?php $this->order_notes('private'); ?>

if you want to display all order notes, including the (private) admin notes, use:

<?php $this->order_notes('all'); ?>

It is also possible to display order notes without creating a custom template, by using one of the template action hooks and adding it to your themes functions.php:

add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_order_notes', 10, 2 );
function wpo_wcpdf_order_notes ($template_type, $order) {
	$document = wcpdf_get_document( $template_type, $order );
	$document->order_notes();
}

or limited to the packing slip:

add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_order_notes', 10, 2 );
function wpo_wcpdf_order_notes ($template_type, $order) {
	if ($template_type == 'packing-slip') {
		$document = wcpdf_get_document( $template_type, $order );
		$document->order_notes();
	}
}