Why does this work to remove a single term?
$existingTerms = wp_get_post_terms($postID, 'custom_taxonomy');
$newTerms = array();
foreach($existingTerms as $term) {
if ($term->slug != 'remove_this_term') {
$newTerms[] = $term->term_id;
}
}
wp_set_post_terms($postID, $newTerms, 'custom_taxonomy');
But this doesn't?:
wp_remove_object_terms($postID, 'remove_this_term', 'custom_taxonomy');
Am I misunderstanding what wp_remove_object_terms does?
s
. So maybe you get early returned bywp_remove_object_terms
.