woocommerce_create_new_customer

The WooCommerce woocommerce create new customer function.

Description

woocommerce_create_new_customer( $email, (string) $username = '', (string) $password = '' ); 

Parameters (3)

0. $email
The email.
1. $username — Optional. (string) => ''
The username.
2. $password — Optional. (string) => ''
The password.

Usage

  1. if ( !function_exists( 'woocommerce_create_new_customer' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The email. 
  5. $email = null; 
  6.  
  7. // The username. 
  8. $username = ''; 
  9.  
  10. // The password. 
  11. $password = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = woocommerce_create_new_customer($email, $username, $password); 
  15.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-deprecated-functions.php  
  1. function woocommerce_create_new_customer( $email, $username = '', $password = '' ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_create_new_customer' ); 
  3. return wc_create_new_customer( $email, $username, $password );