Skip Navigation

[Resolved] Showing custom field by conditional in Woocommerce PDF

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

Problem:

The issue here is that the user has a plugin that generates a pdf from their shop page and the custom fields are not included in this pdf

Solution:
I would Highly recommend contacting the support for this pdf plugin as they might be better able to let you know if their plugin supports custom field data.

This support ticket is created 6 years, 10 months 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.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by martinH-10 6 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#621047
types.png

Tell us what you are trying to do?

I am trying to show custom select field in the woocommerce invoice. I dont know how to display conditional in PDF. However if I try echo(types_render_field( 'delka-predplatneho', array( 'display' => 'normal' ) )); it shows nothing.

I think it is because the PDF is not generated on product page, so the custom field dont know wich product i am calling with that function.

Is there any documentation that you are following?

hidden link
https://toolset.com/documentation/customizing-sites-using-php/functions/

Is there a similar example that we can see?

What is the link to your site?
hidden link

#621077

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

Thank you for contacting our support forum.

How is the PDF generated? Do you go on the frontend and click a link to say you want this product as a pdf?

Also I would Highly recommend contacting the support for this pdf plugin as they might be better able to let you know if their plugin supports custom field data.

Thanks,
Shane

#625099

THX