Home › Forums › General Issues › Trying to automatically assign relationship using updatefield with insert_post › Reply To: Trying to automatically assign relationship using updatefield with insert_post
Hmmm that’s too bad.
Final update: an empty array did not completely work. Somehow leaving it empty made it impossible to actually publish the post (status remained “draft”) so I filled it with some dummy text and now it does what it should do. This issue must be somewhere deep in the WP code.
Really not happy about the fact that I do not understand why it works because I have the feeling it will bite me in the ass at some point, but at least it does work.
Thanks for the help!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
The most recent ACF Chat Friday featured a live demo of how to register CPTs directly in the plugin, one of our most requested features. Check out the summary below for a replay of the demo, and don’t forget to register for the next session! https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 9, 2023
© 2023 Advanced Custom Fields.