Manually triggers email
-
Hello,
I am working in an dive club website. I use the Events Manager that is a great base for the management of our activities.
I created an additional interface, connected to the MySQL DB to change the booking_status of users’s tickets.
Basically, something like$bookingid = $_POST['bookingid']; $action = $_POST['action']; $table = $wpdb->prefix . 'em_bookings'; switch ( $action ) { case "wait" : $execut= $wpdb->query( $wpdb->prepare( "UPDATE <code>" . $table . "</code> SET <code>booking_status</code> = '0' WHERE <code>" . $table . "</code>.<code>booking_id</code> = " . $bookingid . "; ") ); break; case "Approve" : $execut= $wpdb->query( $wpdb->prepare( "UPDATE <code>" . $table . "</code> SET <code>booking_status</code> = '1' WHERE <code>" . $table . "</code>.<code>booking_id</code> = " . $bookingid . "; ") ); break; case "Reject" : $execut= $wpdb->query( $wpdb->prepare( "UPDATE <code>" . $table . "</code> SET <code>booking_status</code> = '2' WHERE <code>" . $table . "</code>.<code>booking_id</code> = " . $bookingid . "; ") ); break; case "delete" : $execut= $wpdb->query( $wpdb->prepare( "DELETE FROM <code>" . $table . "</code> WHERE <code>booking_id</code> = " . $bookingid ) ); break;
`
My point is that this is shortcircuiting the email sending. I can put a wp_mail, but this is stupid as it exists in the plugin Events_Manager. So I wish to subcall the function that is issuing the mail… how can I do this ?
Cheers
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Manually triggers email’ is closed to new replies.