Skip Navigation

[Resolved] How i can displaying custom field in invoice ?

This thread is resolved. Here is a description of the problem and solution.

Problem:

I want displaying a custom field in my pdf invoice with plugin "WooCommerce PDF Invoices & Packing Slips".

Solution:

You can follow their document to output custom fields, for example:

https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/displaying-a-custom-field/

Relevant Documentation:

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.96 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by ThierryR232 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#1124598

Hello,

I want displaying a custom field in my pdf invoice (with this plugin : https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/), how i can do this ?

Thx

#1125110

Hello,

It depends on the " WooCommerce PDF Invoices & Packing Slips" plugin, I have searched in it in the URL you mentioned above, find some related thread:
https://wordpress.org/support/topic/custom-field-on-invoice-and-packing-slip/

And their document:
https://wordpress.org/support/topic/cannot-get-custom-field-to-display-in-invoice-template/

In Toolset side, if you are using Types plugin to create those custom fields, Types will pre-pend slug "wpcf-" before the field slug, for example, if your custom field slug is "my-field", then the field meta key in database is "wpcf-my-field", you can use wordpress function get_post_meta() to get the field value:
https://developer.wordpress.org/reference/functions/get_post_meta/

For your reference.

#1125169

My issue is resolved now. Thank you!