nhrk,
did you happen to see this:
https://gist.github.com/NateWr/00ee083db4d357aeab68
Is that what your are looking to do?
Thread Starter
nhrk
(@nhrk)
@sky007000
Thanks for providing link of the gist.
After adding code from the gist, It is sending the email. But It is using Email of the New Request. I want it to use email template of the Confirmed Email.
Still missing something ?
Thanks again.
Hi nhrk,
That link that Sky007000 is probably your best bet. In this case, I recommend updating the “New Request” email to reflect the fact that the booking is confirmed. That’s easier than the code you’d need to write to swap out the templates being used.
Thread Starter
nhrk
(@nhrk)
Hi
Thanks for reply and Let me know you that It is the best plugin for the developer just because of the filter and action that you have provided 🙂 Totally Loved it.
Currently I doing the same as you advised. But due to some reason I don’t want to do that.
Is there any other way to do it ? I have gone through notification files and in Notifications.class.php there is a line in new_submission function which is having condition if ( $booking->post_status != 'pending' ) {.
So is it going to in else condition ?
Let me know if you have any doubt.
Thanks again.
Hi nhrk,
Yes, because the booking is not pending, it will not fire the new booking email. Instead it will end that event and fire another one, which mimics what would happen if a pending booking was switched to its current status, which is confirmed.
The new notification email is registered and attached to the rtb_insert_booking hook here. You’ll probably want to register a new notification with your own callback. In your custom callback, you can then mimic the callback here without the status check.