WordPress at Your Fingertips
function is not described

WC_Breadcrumb::add_crumbs_category() protected WC 1.0

Category trail.

{} It's a method of the class: WC_Breadcrumb{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->add_crumbs_category();

Code of WC_Breadcrumb::add_crumbs_category() WC 5.8.0

protected function add_crumbs_category() {
	$this_category = get_category( $GLOBALS['wp_query']->get_queried_object() );

	if ( 0 !== intval( $this_category->parent ) ) {
		$this->term_ancestors( $this_category->term_id, 'category' );
	}

	$this->add_crumb( single_cat_title( '', false ), get_category_link( $this_category->term_id ) );
}