I am working on a Magento 2.1.7 shop and I have created a child-theme of Magento Blank
The products are organized into categories and subcategories. In other words, they are organized into parent categories and children categories.
Whenever a product is assigned, through the Magento admin, to a child category, I want it to be automatically assigned to all the ancestor categories of that child category.
I want to manually assign all the boot brands in the store to the "Boots" child category add I want all boots to be automatically put, by Magento, in the "Footwear" parent category.
Question: What is the programming solution that would do the job, recursively?