Set custom post type terms by id without knowing taxonomy
It’s a bit confusing, the documentation for wp_set_post_terms() claims that the $taxonomy argument is “Optional”, but in looking at the source it appears that all this means is that its default value is post_tag if you omit the argument. If you attempt to pass null or an empty string, it won’t work. So I think … Read more