• Hi wpcafe Team,

    how can we insert custom reservation form fields in the emails to users and admin?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter idee

    (@idee)

    Hi, is there no solution for this?
    This is very important. Thanks.

    Plugin Support A Zaman Sagor

    (@azamansagor)

    Hi,

    Greetings! Thanks for reaching out to us.

    Sorry to say that, we don’t have any option to place custom fields dynamically on the email body. You can just place this tag on the email body: https://prnt.sc/1XVNt3tSqs1k

    But we loved your idea and query. You are the first person for this query. Please add your feature request on our roadmap: https://themewinter.com/wpcafe-roadmaps/

    Hope our team will after checking they will take it as a task list. 

    Hope you can understand.

    Thanks for being with us. Good day!

    Best Regards

    Thread Starter idee

    (@idee)

    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; }

    Plugin Support A Zaman Sagor

    (@azamansagor)

    Hi,

    I have noted the custom code and will forward to our developer team if to review it. Thanks for sharing the code.

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘reservation custom fields in emails’ is closed to new replies.