Show specific database value in notification email
-
Hi
what i want to do is to show a specific value from the database in the booking notification e-mail. As i am missing good php knowledge, this is all but trivial to me. I tried for many hours to find a solution, but couldn’t get it and think i have to give it up, if noone can help me with this.I think, the way it should work is like this: As i can use PLACEHOLDERS in the E-Mail options it should be the best way to make a custom placeholder for that database-field.
I found the following code, what seemed to me is close to that what i want to do, but to tell the true is that i have nearly no clue what the line with $replace should look. All the tutorials on the official page are way to complicated.
This is my code for functions.php so far:
/* Adding Bookinginfo Placeholder */
function placeholder_bookinginfo($replace, $EM_Bookings_Table, $result){
global $wp_query, $wp_rewrite;
switch( $result ){
case ‘#_BOOKINGADRESS’:
$replace = get_??( ‘booking_info’, $EM_Booking_Table->??? );
}
return $replace;
}add_filter(’em_event_output_placeholder’,’placeholder_bookinginfo’,1,3);
Maybe there are still chances for small wonders ??
We will see
- The topic ‘Show specific database value in notification email’ is closed to new replies.