WooCommerce PDF Invoices & Packing Slips
[resolved] Add due date (3 posts)

  1. jaybink
    Posted 2 years ago #

    Hi, I would like to ask if it´s possible to add a "due date" (order date +14 days) to invoice?

    Thank you,


  2. Ewout
    Plugin Author

    Posted 2 years ago #

    Hi Jay,
    Yes this is possible. You have to create a custom PDF invoice template (see FAQ), then insert the following code in the location where you want to insert the due date:

    $order_date = $wpo_wcpdf->export->order->order_date;
    $invoice_date = get_post_meta($wpo_wcpdf->export->order->id,'_wcpdf_invoice_date',true);
    $due_date = date_i18n( get_option( 'date_format' ), strtotime( $order_date . ' + 14 days') );
    echo 'Due date: ' . $due_date;

    If you use the invoice date, you could also change $order_date in the line before echo to $invoice date.

  3. Elisa
    Posted 1 year ago #

    Ewout! You are amazing :) Thank you so much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce PDF Invoices & Packing Slips
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic