Editing 'created' date
Hi Nikola,
Is there a way to change the "created" date once you change the Status from Pending to Confirmed? I also didn't find any way to do something when you "save" the appointment after editing HOOK. I was looking for a field for edited date but I couldn't find anything. Adding it also means changing the plugin. So, would love to just update the created date once you change status to confirm. Depending on that date, I am trying to send reminder emails.
Thanks.
Is there a way to change the "created" date once you change the Status from Pending to Confirmed? I also didn't find any way to do something when you "save" the appointment after editing HOOK. I was looking for a field for edited date but I couldn't find anything. Adding it also means changing the plugin. So, would love to just update the created date once you change status to confirm. Depending on that date, I am trying to send reminder emails.
Thanks.
3 Answers
Hi Chandra,
there is no such hook atm. I can expose hook when user click on Confirm link, is that how status is changed in your case?
Best regards,
Nikola
I do it from the admin side (Editing the Appointment and selecting Confirmed). Is there a way we can change the created date when we save that?
Not atm but I can put hook there so you can override valus from appointment.
Best regards,
Nikola
Okay, I would love to have it now so I can apply my custom changes. Where and how should I add the hook and how can I update the created date? Thanks so much.
Hi Nikola,
If you can let me know where to add the hook so I can change the date on "Confirmation", that would be so much helpful. It looks like the update is done via AJAX. I do see an UPDATE case in parse_appointment() function, Is this line useful in this case? do_action('ea_edit_app', $app_data['id']);
If you can let me know where to add the hook so I can change the date on "Confirmation", that would be so much helpful. It looks like the update is done via AJAX. I do see an UPDATE case in parse_appointment() function, Is this line useful in this case? do_action('ea_edit_app', $app_data['id']);
looks like I found it.. add this line in the ajax.php, UPDATE case seems to update the date.. but will need to write a hook here.
$app_data[‘created’] = date( ‘Y/m/d H:i:s’ );
Let me know if there is a better way. I am sure there is. 🙂 Thanks a lot.
Please login or Register to submit your answer