WC_Breadcrumb::add_crumbs_author()protectedWC 1.0

Add a breadcrumb for author archives.

Method of the class: WC_Breadcrumb{}

No Hooks.

Return

null. Nothing (null).

Usage

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

WC_Breadcrumb::add_crumbs_author() code WC 8.7.0

protected function add_crumbs_author() {
	global $author;

	$userdata = get_userdata( $author );

	/* translators: %s: author name */
	$this->add_crumb( sprintf( __( 'Author: %s', 'woocommerce' ), $userdata->display_name ) );
}