I have extended the user profile with some acf fields, it is working great! Now, I would like to upon save the users profile, a cpt post should be created or updated.
I know how to do the inner logic… I think, but I don’t know which function to hook into. Examples that I’ve found uses acf_form(), but I cannot see how I can hook into that and run a wp_update_post.
Anyone with suggestions to push me in the right direction?
You want to use acf/save_post.
The post id passed when updating a user will look like “user_{$user_id}”