Plugin Contributor
Ewout
(@pomegranate)
Hello Chris,
The the_field function needs context of a specific wordpress post, and that doesn’t work within the context of an invoice. You can pass the specific order ID to the function like so:
the_field('courier', $order->get_id());
You didn’t specify where exactly you added this function (in the template or in a code snippet), so I can’t be sure whether this will work. Let us know if it doesn’t!
Thread Starter
atsouf
(@atsouf)
Hello,
i had it on the php woocommerce / pdf / mysite / invoice.php
It worked like charm!!! everything looks perfect!
Thanks a lot for all the help
Plugin Contributor
Ewout
(@pomegranate)
Very glad to hear that 🙂
If you can spare a moment, we always appreciate if you can leave us a review here on ww.wp.xz.cn: https://ww.wp.xz.cn/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/
Thanks in advance!