Problem: I would like to include information from a custom field in my WooCommerce Order email by adding some code with types_render_field().
Solution: I'm not sure how to modify these email templates, but I can explain how to use the types_render_field function.
- In order to get a Types custom field value from an order post you need to supply the order ID to the types_render_field function's parameters array.
- You need to use the "wpcf-" prefix applied to the field slug.
- You should specify the raw output type to prevent extra markup from being applied to the output.
Example:
[php]Replace 12345 with the Order ID, or a variable or shortcode that provides that ID.
Relevant Documentation: https://toolset.com/documentation/customizing-sites-using-php/functions/
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 11 months ago.
Assisted by: Christian Cox.