Support

Home Forums Event Espresso Premium Date format on the invoice

Date format on the invoice

Posted: April 10, 2014 at 3:39 am

Viewing 3 reply threads


Anonymous

April 10, 2014 at 3:39 am

Hi,
Is it possible to change the date format on the invoice from MMDDYYYY to DDMMYYYY?

We are on version 3.1.21.P.

Thank you in advance.


Dean

April 10, 2014 at 3:53 am

Hi,

Version 3.1.21.P has been out of date for nearly 2 years now. As such it isn’t supported, and I would strongly suggest updating.

The latest version of Event Espresso works in a way that the invoice date format is based on the WordPress date settings, so if your WordPress dates are dd/mm/yyyy, then that’s what will appear on the invoice.

If you must stay on that version, then your only solution would be to edit the invoice template directly.

In the gateway/invoice/template.php on line 118 you will see

$pdf->Cell(180, 0, __('Date: ', 'event_espresso') . date('m-d-Y'), 0, 1, 'R'); //Set invoice date

change it to

$pdf->Cell(180, 0, __('Date: ', 'event_espresso') . date( get_option('date_format') ), 0, 1, 'R'); //Set invoice date


Anonymous

April 10, 2014 at 9:50 pm

Hi Dean,
Thank you so much for your help on this.
We are definitely planning to upgrade but we need to live with an event ASAP that’s why we need to patch it now.

I have one more question please.

The date against the event on the invoice is also American format. Can that be fixed as well?

Thank you,
Ramtin


Dean

April 11, 2014 at 12:44 am

Hi,

Yes it can, basically anywhere in that file where it says ‘m-d-Y’, change it to get_option(‘date_format’) like in the example above.

I believe the only two instances of this are on lines 118 and 164 (approx.)

Viewing 3 reply threads

The support post ‘Date format on the invoice’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso