WordPress at Your Fingertips
function is not described

WC_Customer::set_email() public WC 3.0.0

Set customer's email.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Customer = new WC_Customer();
$WC_Customer->set_email( $value );
$value(string) (required)
Email.

Changelog

Since 3.0.0 Introduced.

Code of WC_Customer::set_email() WC 5.9.0

public function set_email( $value ) {
	if ( $value && ! is_email( $value ) ) {
		$this->error( 'customer_invalid_email', __( 'Invalid email address', 'woocommerce' ) );
	}
	$this->set_prop( 'email', sanitize_email( $value ) );
}