Home › Forums › Backend Issues (wp-admin) › update_field for taxonomy field type › Reply To: update_field for taxonomy field type
I’ve just tested wp_set_object_terms()
function with the acf/save_post
hook, and it’s working correctly. But please keep in mind that I modified the code so it’s working on my installation.
Could you please make sure that the variables have the correct values? Could you please debug it like this:
echo "\noeuvre\n:";
var_dump( $oeuvre );
echo "\nterm_id\n:";
var_dump( $term_id );
Also, could you please add the variable manually like this:
$term_taxonomy_ids = wp_set_object_terms( 99, 123, 'statut_pret');
Where “99” is the post ID and “123” is the term ID.
Thanks 🙂
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.