Hi @kharlo
I would highly encourage you to not duplicate your data by having both taxonomy and custom field saving the save data.
This ‘saving all the posts’ issue is only one of many synchronized issues you will experience with this data structure.
If you are adamant about this method, you can write a custom loop using WP_Query
and for each post, use the update_field
function to save the taxonomy term ID’s as an array.
Thanks
E