One of more common requests we get refers to the ability to change the content of tour mails; namely, both the booking and payment confirmations.
Such a content change can include adding or deleting the provided tour info, rewriting the message template or simply changing the labels in the message.
It is important to note, however, that changing the tour booking confirmation and tour payment emails requires a certain amount of custom coding, which is unfortunately not included in the scope of services which our support team provides.
Therefore, this article will focus on providing the file paths and the relevant functions required for this change.
Regarding tour booking confirmation, the file that needs to be changed is
\wp-content\plugins\theme_name-tours\post-types\tours\lib\booking-handler.php
Handling mails sent to clients is done in sendUserConfirmationEmail function.
In order to change the mails sent to tour admins about successful tour bookings, editing sendAdminConfirmationEmail is required.
Both screenshots are taken from our Roam theme, but the content is almost the same across all our tour themes; this includes function names (“sendUserConfirmationEmail” and “sendAdminConfirmationEmail”) which also remain the same.
Admin receives the confirmation email on his Admin Email address, which can be set in Theme_name Options > Tours > Admin Booking Email > Admin Email, or on admin’s default email address, if the Admin Email field is left empty.
Screenshot taken from Bridge theme.
In order to change the content of confirmation mails regarding tour payments (both successful and unsuccessful ones), you’d need to edit this template file:
\wp-content\plugins\theme_name-tours\admin\booking-dashboard\booking-dashboard.php
As with the previous example, the content of the relevant function is more or less the same.
However, the name of the function might have slight differences.
In most cases the function that needs to be changed is called theme_nameToursSendApproveEmail but sometimes it might be called theme_nameToursSendApproveEmal, which is why we suggest that you search for ToursSendApprove within the given file, using the CTRL + F functionality.
Also, the theme_name part might be an entire word (like qode) or a theme prefix (like eltd or mkdf, for example).
⋅ E.g - Theme name is eltdToursSendApproveEmail, taken from the BonVoyage theme.
Additionally, if the only change needed is translating the labels, we suggest using a translate plugin for that purpose instead of directly changing the labels in the given files, as the change will be lost after the theme update.
In that case, please make sure to translate Theme_name Tours plugin.
You can find the required POT file in the wp-content\plugins\theme_names-tours\languages folder.