I want to retrieve all related categories of my parent category in my Gutenberg plugin. I know I can select categories with the getEntityRecords function. However, this function returns only the specific category and not his children, and I don't know how to retrieve the related child.
My current call look like this:
wp.data.select('core').getEntityRecords('taxonomy', 'category', {include: [7], page: 1, per_page: -1});
The ID 7 is from my parent. I want the related child categories.
Greeting