-1
位置(屬性)如何獲得woocommerce產品屬性中的子項的父項?
--India(term)
---Mumbai (term with parent of India)
---Kolkata (term with parent of India)
在產品屬性部分我選擇Mumbai
作爲位置。
我可以在產品封存網頁得到這個爲:
$product->get_attribute("pa_location");
但我怎麼可以從$product
得到India
(的Mumbai
父)。