I'm trying to save a field value for a taxonomy term, my value appears in the term array, but the "fields" array is empty. I'm not sure if it's right what I am going to do. You can see everything about my case in the attached screenshot.
1 Answer
Yes, as @Trupal said, forget about the internal properties of the term objects, that's internal details that are not relevant to you.
If you want to see what's inside, try $term->toArray() and look at the result of that in your debugger. Or access the field value with $term->field_foo->value.