$product_id = 8; // ID of parent product $product = wc_get_product( $product_id ); $children = $product->get_children();