Hello there,
I have a restaurant demo installed.
When I fill reservation form it send data (Name, Date, Time, Telephone, Nº Seats, Nº Table, Client Notes) to email (Email address hidden if logged out) . Everything work fine.
I need after (or during) this email sending, send html post request via API (post request to online reservation platform).
Fields that I need to send:
“bookingTimestamp”: timestamp of reservation (need to transform reservation date and time to number of seconds from 1970)
“contact”:Telephone number
“establishmentId”: establishment Id=96 always
“name”: Client name
“quantity”: number of seats
“clientNotes”: clients notes
I have a child theme installed.
Please, can you help me to send this post request? And also transform data to needed format to number of seconds from 1970?
Thank you,
Best Regards.
Hey DariaAlbufeira,
Thank you for the inquiry.
That is surely possible but this option or feature will require modification that is beyond the scope of support. You may need to hire a freelance developer or contact our partner, Codeable.
You can find the code that sends the email in the enfold/framework/php/class-form-generator.php file. The function is called the send function, which is using the mail or the wp_mail functions by default, so you should be able to use the filters or hooks related to those functions before actually sending the mail.
Best regards,
Ismael