Support

Account

Home Forums Backend Issues (wp-admin) Update field in category by functions.php on category save? Reply To: Update field in category by functions.php on category save?

  • You should use the acf/save_post hook with a priority > 10

    
    function overwrite_ratings_category($post_id){
      if (is_string($post_id) && substr($post_id, 0, 5) == 'term_') {
        update_field('field_630dbc7cf3fdd', '432', $post_id);
      }
    }
    
    add_action('acf/save_post','overwrite_ratings_category');
    

    This might change depending on what type of field you are trying to update. What type of field are you trying to update?