Show sub-child categories on the customized shop page

Targets : Show Locations (sub-districts & cities) on shop page

On the categories, i have created :

  • Island (parent)
    • province (child)
      • City (sub-child)

Then on the product attributes, i have also made :

  • pa_district
  • pa_sub-district ($ kelurahan_val)

I already have a code snippet to customize a shop page like the following :

add_filter( 'woocommerce_loop_add_to_cart_link','displaying_product_attributes',5);  function displaying_product_attributes() { global $  product;    $  tipe_iklan_val = $  product->get_attribute('pa_tipe-iklan');  $  title_val = $  product->get_title();  $  harga_val = $  product->get_attribute('pa_harga');  $  kt_val = $  product->get_attribute('pa_kt'); $  km_val = $  product->get_attribute('pa_km');  $  luas_bangunan_val = $  product->get_attribute('pa_luas-bangunan'); $  luas_tanah_val = $  product->get_attribute('pa_luas-tanah');  $  kelurahan_val = $  product->get_attribute('pa_kelurahan'); /*maybe code for sub-child categories in here)*/      $  sku_val = $  product->get_sku();   echo "<p style='color:#000; margin-left:5px; text-align:center; font-size:16px; height:24px; border:1px solid transparent; background-color:#e4e4e4; border-radius:5px; width:fit-content; width:-moz-fit-content; font-weight:600;padding-top:3px; padding-left:10px;padding-right:10px; margin-top:5px; letter-spacing:1.1px; box-shadow: 0px 0px 4px 1.5px rgb(0 0 0 / 0.8);'>".str_replace(',',' atau', $  product->get_attribute .$  tipe_iklan_val)."</p>";  echo "<h2 style='font-size:16px; margin-left:5px;text-overflow: ellipsis;overflow:hidden;white-space:nowrap;'>".$  title_val."</h2>";   echo "<p style='color:#1ebf41; text-align:left;margin-left:6px; padding-top:10px; font-size:18px;line-height:0.9; font-weight:bold'>".$  harga_val."</p>";  echo "<p style='color:#333; text-align:left;margin-left:7px;font-size:14px;line-height: 0.1;'><i class='fas fa-bed'></i> &nbsp;".$  kt_val."&emsp;<i class='fas fa-shower'></i> &nbsp;".$  km_val."&emsp;<i class='fa fa-home'></i>&nbsp; ".$  luas_bangunan_val."m<sup>2</sup>&emsp;<i class='fas fa-expand-arrows-alt'></i>&nbsp; ".$  luas_tanah_val."m<sup>2</sup></p>";  echo "<p style='color:#333; text-align:left; margin-left:7px;font-size:14px;line-height: 1;'><i class='fas fa-map-marker-alt'></i>&nbsp; ".$  kelurahan_val.",&nbsp;"./*$  sub-child_categories_val.*/"</p>";  echo "<p style='color:#333; text-align:left;margin-left:7px; font-size:14px;line-height: 0.8;'>ID : ".$  sku_val."</p>"; } 

The code above has a display like this

How can I reach the target?