Are you sure that you are not mixing a taxonomy and the term slug?
Thread Starter
Kai
(@kaiono)
Thank you. I double checked again but the slug was not mixed up.
I found out that the meta data dissapears when I saved an array object inside.
wp_update_term() doesn’t impact term meta one way or another on its own. However, to save term meta data, we typically hook into one of the function’s actions. I think the problem is in whatever logic is used to save term meta on creation. It’s not differentiating between a new insertion and an update. With an update, there’s no meta data, so what had been saved is replaced by empty data. So either alter that logic, or you will need to fetch the existing data before updating.