WordPress at Your Fingertips
function is not described

WC_Breadcrumb::add_crumbs_shop() protected WC 1.0

Shop breadcrumb.

{} 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_shop();

Code of WC_Breadcrumb::add_crumbs_shop() WC 5.8.0

protected function add_crumbs_shop() {
	if ( intval( get_option( 'page_on_front' ) ) === wc_get_page_id( 'shop' ) ) {
		return;
	}

	$_name = wc_get_page_id( 'shop' ) ? get_the_title( wc_get_page_id( 'shop' ) ) : '';

	if ( ! $_name ) {
		$product_post_type = get_post_type_object( 'product' );
		$_name             = $product_post_type->labels->name;
	}

	$this->add_crumb( $_name, get_post_type_archive_link( 'product' ) );
}