WooCommerce: Add Order Notes to WooCommerce PDF Invoices

I use the “WooCommerce PDF Invoices & Packing Slips” plugin, available on the WP Repository, to invoice my clients. At times, for accounting purposes, I need to show the VAT/TAX ID of the client on the PDF invoice.

So, I open the order via WooCommerce > Orders, open the order I want to edit, add a “Note to the Customer” from the right hand side… and then have the following snippet in my functions.php adding such information on the PDF invoice!

Add a “Note to customer” via the Order Admin
/**
 * @snippet       Add "Note to Customer" @ WooCommerce PDF Invoice
 * @how-to        Get CustomizeWoo.com FREE
 * @sourcecode    https://businessbloomer.com/?p=21728
 * @author        Rodolfo Melogli, Hans Schuijff @ dewitteprins.nl
 * @compatible    WC 3.1.0, Woo P.I.P.S. 2.0+
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

add_action( 'wpo_wcpdf_after_order_details', 'bbloomer_add_note_to_customer_to_PDF_invoice_new', 10, 2 );

function bbloomer_add_note_to_customer_to_PDF_invoice_new( $template_type, $order ) {
    $document = wcpdf_get_document( $template_type, $order );
    $document->order_notes();
}

And here’s the final result:

Displaying order notes on “WooCommerce PDF Invoices & Packing Slips” invoice PDF

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php file (delete "?>" if you have it there). CSS, on the other hand, goes in your child theme style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything worked as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting on PHP 7.3.

If you think this code saved you time & money, feel free to join 14,000+ WooCommerce Weekly subscribers for blog post updates or 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance :)

Need Help with WooCommerce?

Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

12 thoughts on “WooCommerce: Add Order Notes to WooCommerce PDF Invoices

  1. Hello its not working now can you check ?

    1. Works for me. Which PDF plugin are you using?

      1. Hello
        Thanks a lot for all your tips – very useful !
        This one does not work for me either – I use Woocommerce Pdf Invoices Packing Slips.
        Could you please double-check if one of the latest Woocommerce updates have not impactd your snippet ?

        Thanks

        Nick

        1. Hi Nick, seems https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/displaying-order-notes/ states the same. In case contact the plugin dev?

  2. Thanks as always. I am having difficulty understanding if each of the two snippets goes into the child theme functions.php? When I added both nothing seemed to appear in the pdf invoice. Thanks.

    1. Hey Adam, thanks for your comment! I removed the second snippet as it’s obsolete now, so you need to use just the first one. Order notes should appear on PDF invoices, unless something has changed in the plugin coding. Please note only “Notes to customer” will show (and not the other kind of notes). Test this out and let me know ๐Ÿ™‚

  3. Thanks for sharing your WP code snippets, very useful.

    1. You’re welcome!

  4. thanks for that snippet, works fine. Only thing is: it shows “Note to client” on the Invoice as well, followed by the actual note.

    Is there an easy way to get rid of the “Note to client” part?

    1. Hello Chris, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  5. I want to do something similar with this plugin but do not know how to write the code!

    I want to add the customer’s email to the packing list right underneath the shipping method. I cannot figure out how to do it for the life of me.

    1. Hey Linda, thanks for your comment! Have you tried asking the plugin’s support team?

Questions? Feedback? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

Your email address will not be published.