I am trying to programatically remove a product from a category but it isn't working.
I have tried:
$product->setCategoryIds($categoryIds);and then saving with
- Removing the category using
$categoryLinkManagement->assignProductToCategories($productSky, $categoryIds)(should remove categories not in the list)
I have also tried manually reindexing after every attempt, but with all of these methods the product still stays in the category I don't want it to be in.