How can I change the date on the top-right corner of the receipt to the actual Payment Date?
Right now, it’s showing registration date. But the date that a person register is not the same date as when the person made payment. The Receipt date needs to be the same as the payment date.
The date in which a payment is made, is stored within the payment itself, so to output that date, you need to the payment object.
I can add a new shortcode for [Payment_date]
That code adds the shortcode the EE_Payment_Shortcodes, which is intended to loop over all of the payments within a transaction and passes the payment object to each loop which then outputs the details for each shortcode for each specific payment object.
You can’t use that across the whole template because the data passed to each section is different but what you can do, is add a LAST_PAYMENT_PAYMENT_TIMESTAMP shortcode to the EE_Transaction_Shortcodes library. Transaction shortcodes are available in most of the template and you can usually find the transaction object from anywhere, then pull the last payment from that.
So that shortcode would pull the last payment made on a transaction and then output the timestamp for that, would that work?
Here is an example based on the code Josh provided in your other thread:
The support post ‘Payment date on top of Receipt instead of Registration Date’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.