• Resolved nartoof

    (@nartoof)


    Hi,

    I’d like to add the due date to my invoices.
    I got a script to calculate the date, but I can’t find any hook to run it. I need it :

    • Working in back and front office.
    • After order is created (back / front) or saved (back)
    • Before the PDF is created
    • I tried woocommerce_order_status_changed , the order meta is in the database but the field in the PDF is empty (looks like the hook runs after you’re plugin action).

      Do you have any hook I can use who is run before you create the PDF?

      Thank you very much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @nartoof,

    We have a lot of PDF template action hooks that you can use to add custom info to your PDF documents. You can see an example here that seems to be what you want to do: Print a due date on the invoice

    Thread Starter nartoof

    (@nartoof)

    Thank you very much for your answer.

    I already tried the wpo_wcpdf_before_document hook but it didn’t work.

    The difference is I really need to use a hook to save the due date as order meta, and after that print it in the template with a $order->get_meta('due_date');

    But I’ll find a way to figure it out with your answer ??

    Have a nice day.

    • This reply was modified 2 years, 1 month ago by nartoof.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add due date from order meta’ is closed to new replies.