Events Manager: Create custom Placeholder for use in Email notification

Question

I have written a function (child-theme; functions.php) for the plugin Event-Manager in WordPress.
This function reads values out of custom input fields and saves those in the databse.

I would like to write a custom Placeholder in order to place it in the email notification.

The function is:

function em_save_custom_event_fields() {
    global $EM_Booking;
    if(!empty($_REQUEST['user_motorcycle'])) {
        $EM_Booking->booking_meta['registration']['user_motorcycle'] = wp_kses($_Request['user_motorcycle'], array());
    }
}
add_filter('em_booking_add, em_save_custom_event_fields');

For the email notification I would like to add a new placeholder called #_USERMOTORCYCLE in the template that actually replaces the placeholder with the value that was provided by the user and stored at:

$EM_Booking->booking_meta['registration']['user_motorcycle']

I have searched the web and found some samples but as a novice I am not able to apply them to my requirements.

Create a Custom Placeholder for Event Formatting
and
Show specific database value in notification email

0
, , Daniel 3 years 2019-11-01T07:10:53-05:00 0 Answers 91 views 0

Leave an answer

Browse
Browse