Due date show wrong year
-
Hi,
After upgrading I got a problem with the due date. It shows the correct day and month, but instead of the correct year its just what appears to be a random number, for instance 4306.
The code I’m using:
add_action( ‘wpo_wcpdf_after_order_data’, ‘wpo_wcpdf_due_date’, 10, 2 );
function wpo_wcpdf_due_date ($template_type, $order) {
if ($template_type == ‘invoice’) { // put due date only on invoice
$invoice_date = method_exists($order, ‘get_meta’) ? $order->get_meta(‘_wcpdf_invoice_date’,true,’edit’) : get_post_meta( $order->id, ‘_wcpdf_invoice_date’, true );
$due_date = date_i18n( get_option( ‘date_format’ ), strtotime( $invoice_date . ‘ + 15 days’) );
?>
<tr class=”due-date”>
<th>F?rfallodatum:</th>
<td><?php echo $due_date; ?></td>
</tr>
<?php
}
}Best regards
JohanThe page I need help with: [log in to see the link]
- The topic ‘Due date show wrong year’ is closed to new replies.