WC_Customer::get_username()publicWC 3.0.0

Return the customer's username.

Method of the class: WC_Customer{}

No Hooks.

Return

String.

Usage

$WC_Customer = new WC_Customer();
$WC_Customer->get_username( $context );
$context(string)
What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'

Changelog

Since 3.0.0 Introduced.

WC_Customer::get_username() code WC 8.7.0

public function get_username( $context = 'view' ) {
	return $this->get_prop( 'username', $context );
}