No reply from developer, fixed myself. at least, this works for me.
Files involved:
/wp-content/plugins/woocommerce-delivery-notes/templates/print-order/print-content.php
/wp-content/plugins/woocommerce-delivery-notes/templates/print-order/style.css
1st override print-content.php. Create folder for woocommerce within your child Theme, then create a subfolder called print-order and place print-content.php within this. This is now the file you want to edit.
What worked for me I placed my code just beneath </div><!– .order-addresses –> which is around line 49 of print-content.php
`<?php /* Add Shopper Role to Receipt START */ ?>
<div class=”shopper-role”>
<h3><?php
$cust_user = get_post_meta( $order->id, ‘_customer_user’, true ); //get user for order
$user_info = get_userdata($cust_user); //get user info for user
echo ‘Shopper Role : ‘ . ucwords(implode(‘, ‘, $user_info->roles)) . “\n”; //get the roles for the user & make them titlecase with ucwords
/* Add Shopper Role to Receipt END */ ?></h3> </div><!– .shopper-role –>`
Then after overriding style.css I added the following to control font size
.shopper-role {
font-size: 1.25em;
}
-
This reply was modified 7 years, 4 months ago by
mowlman.