Automattic\WooCommerce\Internal\Admin
CategoryLookup::get_descendants()
Get category descendants.
Метод класса: CategoryLookup{}
Хуков нет.
Возвращает
Массив
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_descendants( $category_id );
- $category_id(int) (обязательный)
- The category ID to lookup.
Код CategoryLookup::get_descendants() CategoryLookup::get descendants WC 8.7.0
protected function get_descendants( $category_id ) { global $wpdb; return wp_parse_id_list( $wpdb->get_col( $wpdb->prepare( "SELECT category_id FROM $wpdb->wc_category_lookup WHERE category_tree_id = %d", $category_id ) ) ); }