In order to get this to work for you, you will need to change 478 to the ID of your view and 'category' to the slug of the taxonomy that you want to remove the child terms for.
Add the code to your Toolset custom codes in Toolset -> Settings -> Custom Code and ensure that you've activated it.
Relevant Documentation:
For more information on this hook you can take a look at the link below.
Problem: After moving my site's WordPress installation to the root directory, my site key no longer works and I see an error message that the Toolset plugins cannot connect to Toolset.com. In the installer support page, I see that the site key does not match the current site URL.
Solution: Delete the old site key from @https://toolset.com/account/sites and generate a new registration key. Unregister the Toolset software and then re-register with the new key.
Problem: I would like to add some non-Toolset blocks to a post, but the changes I make in the post editor are not reflected on the front-end of the site.
Solution: Check to see if a Content Template is assigned to the post. If so, you may need to make changes in the Content Template instead of the post editor to see those updates on the front-end of the site. The Content Template design overrides the post content in the post editor.