I have a child category and its parent category. How can I change parent category for this child category? Programatically, in a module helper.
$category is your child category. And you want to make it a child of the category
You can call this: