Why does wp_remove_object_terms not work?

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_terms’, ‘custom_taxonomy’);

Am I misunderstanding what wp_remove_object_terms does?

Read more here:: Why does wp_remove_object_terms not work?

Leave a Reply

Your email address will not be published. Required fields are marked *