Skip Navigation

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

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 6 años, 1 mes. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por ThierryR232 hace 6 años, 1 mes.

Asistido por: Luo Yang.

Autor
Mensajes
#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!