Automattic\WooCommerce\Internal\Admin
CategoryLookup::get_descendants()
Get category descendants.
Method of the class: CategoryLookup{}
No Hooks.
Return
Array
.
Usage
// protected - for code of main (parent) or child class $result = $this->get_descendants( $category_id );
- $category_id(int) (required)
- The category ID to lookup.
CategoryLookup::get_descendants() CategoryLookup::get descendants code WC 9.6.1
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 ) ) ); }