Hi! The invoice date reflects the date when the invoice is created, this is not necessarily the same as the order date if the invoice was paid on a later date. (just like the order number is not the same as the invoice number).
If you want to use the order date as invoice date, you can do this with a filter:
add_action( 'wpo_wcpdf_invoice_get_date', 'wpo_wcpdf_order_data_as_invoice_date', 10, 2 );
function wpo_wcpdf_order_data_as_invoice_date( $date, $document ) {
if ($document->get_type() == 'invoice' && !empty($document->order)) {
$date = $document->order->get_date_created();
}
return $date;
}
If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters.
Hope that helps!
Ewout