• Hi All

    I have a custom post type (‘booking’)that uses around 20 custom fields to populate the post content. Once this content is added, various calculations are made, various other fields are automatically populated and everything ends up as a ‘booking’.

    So heres the problem, when the post is published, Im hooking into ‘updated_post_meta’ to send an email using wp_mail() containing all the posts content and meta.

    However, the mail is being sent before the meta fields are being added to the database? I need a way to add the data, save it and then send the mail.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘update_post_meta() and wp_mail() when adding a new psot’ is closed to new replies.