Did it ourselfs. But thats major function.
Restaurat staff do not want to login into systems, the read mails which should have all requiered data in it.
add_filter( ‘wp_mail’, ‘custom_reservation_fields_mail’); function custom_reservation_fields_mail($data) { global $wpdb; $latest_order_id_by_email = $wpdb->get_var( “SELECT post_id FROM ” . $wpdb->postmeta . ” WHERE meta_key = ‘wpc_email’ AND meta_value = ‘{$data[‘to’]}’ ORDER BY meta_id DESC LIMIT 1″ ); if (!$latest_order_id_by_email) { return $data; } $replacements = array( ‘reserv_extra_1’ => get_post_meta($latest_order_id_by_email, ‘reserv_extra_1’, true), ‘reserv_extra_0’ => get_post_meta($latest_order_id_by_email, ‘reserv_extra_0’, true), ); foreach ($replacements as $key => $value) { $data[‘message’] = str_replace(‘{‘ . $key . ‘}’, $value, $data[‘message’]); } return $data; }