WordPress at Your Fingertips
function is not described

WC_Customer::set_display_name() public WC 3.1.0

Set customer's display name.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Customer = new WC_Customer();
$WC_Customer->set_display_name( $display_name );
$display_name(string) (required)
Display name.

Changelog

Since 3.1.0 Introduced.

Code of WC_Customer::set_display_name() WC 5.9.0

public function set_display_name( $display_name ) {
	/* translators: 1: first name 2: last name */
	$this->set_prop( 'display_name', is_email( $display_name ) ? sprintf( _x( '%1$s %2$s', 'display name', 'woocommerce' ), $this->get_first_name(), $this->get_last_name() ) : $display_name );
}