WordPress at Your Fingertips
function is not described

WC_API_Customers::create_customer() public WC 1.0

Create a customer

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

No Hooks.

Return

Array|WP_Error.

Usage

$WC_API_Customers = new WC_API_Customers();
$WC_API_Customers->create_customer( $data );
$data(array) (required)
-

Code of WC_API_Customers::create_customer() WC 5.6.0

public function create_customer( $data ) {

	if ( ! current_user_can( 'create_users' ) ) {
		return new WP_Error( 'woocommerce_api_user_cannot_create_customer', __( 'You do not have permission to create this customer', 'woocommerce' ), array( 'status' => 401 ) );
	}

	return array();
}