WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

woocommerce_get_product_subcategories() WC 1.0

Get (and cache) product subcategories.

Возвращает

Массив.

Использование

woocommerce_get_product_subcategories( $parent_id );
$parent_id(число)
Get subcategories of this ID.
По умолчанию: 0

Код woocommerce get product subcategories: woocommerce/includes/wc-template-functions.php WC 3.7.1

<?php
function woocommerce_get_product_subcategories( $parent_id = 0 ) {
	$parent_id          = absint( $parent_id );
	$cache_key          = apply_filters( 'woocommerce_get_product_subcategories_cache_key', 'product-category-hierarchy-' . $parent_id, $parent_id );
	$product_categories = $cache_key ? wp_cache_get( $cache_key, 'product_cat' ) : false;

	if ( false === $product_categories ) {
		// NOTE: using child_of instead of parent - this is not ideal but due to a WP bug ( https://core.trac.wordpress.org/ticket/15626 ) pad_counts won't work.
		$product_categories = get_categories(
			apply_filters(
				'woocommerce_product_subcategories_args',
				array(
					'parent'       => $parent_id,
					'hide_empty'   => 0,
					'hierarchical' => 1,
					'taxonomy'     => 'product_cat',
					'pad_counts'   => 1,
				)
			)
		);

		if ( $cache_key ) {
			wp_cache_set( $cache_key, $product_categories, 'product_cat' );
		}
	}

	if ( apply_filters( 'woocommerce_product_subcategories_hide_empty', true ) ) {
		$product_categories = wp_list_filter( $product_categories, array( 'count' => 0 ), 'NOT' );
	}

	return $product_categories;
}