Looking at your original code, see my comments in the code
$field_key = "average_review_score"; $value = "8"; $post_id = "3"; $get_av = get_field( "average_review_score", $post_id ); echo $get_av; // this is updating the post with an ID of 3 // it is not updating a term in a taxonomy update_field( $field_key, $value, $post_id );
If your intent is to update a field that is attached to a term in a taxonomy then you need to use a $post_id that represents that term. See “Getting values from other places” on this page https://www.advancedcustomfields.com/resources/get_field/
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!
© 2022 Advanced Custom Fields.