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!
WooCommerce: Get Customer Second Last Order There is a native, handy way to get a WooCommerce customer’s last order: wc_get_customer_last_order( $customer_id ) This time, I want...
Please let me know in the comments if everything went 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.
If you think this code saved you time & money, feel free to join 17,000+ WooCommerce Weekly subscribers for blog post updates and 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.
16 thoughts on “WooCommerce: Add Order Notes to WooCommerce PDF Invoices”
Jason
I’ve been trying to find this solution, but for the invoices and packing slip plugin that webtoffee makes. And it’s driving me up a wall. Why on earth did woocommerce decide to use post comments as the order notes instead of using postmeta???
Any ideas on how I can get it to work on the plugin I’m using? Hopefully you’ve used it before.
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 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.
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 🙂
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
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 :)
With 100,000 (and growing) monthly organic sessions, Business Bloomer is the most consistent, most active and most complete WooCommerce development/customization blog.
Of course this website itself uses the WooCommerce plugin, the Storefront theme and runs on a WooCommerce-friendly hosting.
I’ve been trying to find this solution, but for the invoices and packing slip plugin that webtoffee makes. And it’s driving me up a wall. Why on earth did woocommerce decide to use post comments as the order notes instead of using postmeta???
Any ideas on how I can get it to work on the plugin I’m using? Hopefully you’ve used it before.
I’m sure WebToffee will be happy to help
worked 100%
Cool
Hello its not working now can you check ?
Works for me. Which PDF plugin are you using?
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
Hi Nick, seems https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/displaying-order-notes/ states the same. In case contact the plugin dev?
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.
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 🙂
Thanks for sharing your WP code snippets, very useful.
You’re welcome!
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?
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
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.
Hey Linda, thanks for your comment! Have you tried asking the plugin’s support team?