php – How do I unset category from a product in wordpress by code
I would like to take it out a category from a product. If I want to insert a category I use:
$categories = array(1, 2, 3); // Categories IDs wp_set_post_terms($product->ID, $categories, 'product_cat', true);
However I do not know how to unset a category from the product. Someone can help me?