Support » Requests and Feedback » Post Meta in Save Post Hook

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have a custom post type CRM, and I need to send a mail after each CRM saved or updated. I user cmb2 for some custom meta like the subject, to users, etc. Oursainsburys I know the save_post hook fires after post save (according to WordPress codex) in my case when I call save_post with two parameters (id and post) the post does not contains update values.

    You will need to hook into the save_post hook after CMB2 does. Something like:

    add_action( 'save_post', 'your_function_callback', 20, 2 );

    The priority parameter. Still does not provide the post meta. But definitely something I overlook too often.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.