WC_Breadcrumb::add_crumbs_product_category
Product category trail.
Метод класса: WC_Breadcrumb{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->add_crumbs_product_category();
Код WC_Breadcrumb::add_crumbs_product_category() WC Breadcrumb::add crumbs product category WC 10.9.1
protected function add_crumbs_product_category() {
$current_term = $GLOBALS['wp_query']->get_queried_object();
$this->prepend_shop_page();
$this->term_ancestors( $current_term->term_id, 'product_cat' );
$this->add_crumb( $current_term->name, get_term_link( $current_term, 'product_cat' ) );
}