WC_Customer::set_email()
Set customer's email.
Method of the class: WC_Customer{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Customer = new WC_Customer(); $WC_Customer->set_email( $value );
- $value(string) (required)
- Email.
Changelog
Since 3.0.0 | Introduced. |
WC_Customer::set_email() WC Customer::set email code WC 9.3.3
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 ) ); }