why shouldn’t i save metadata when its a revision
You omitted how is this function called. I assume it is added to save_post action. This action passes current post id as argument. In case of revision that would be revision id and not parent post id. So, as I see it, there is no reason to save additional data for revision (creating duplicate set … Read more