WC_API_Customers::delete_customer()publicWC 1.0

Delete a customer

Method of the class: WC_API_Customers{}

No Hooks.

Return

Array|WP_Error.

Usage

$WC_API_Customers = new WC_API_Customers();
$WC_API_Customers->delete_customer( $id );
$id(int) (required)
the customer ID

WC_API_Customers::delete_customer() code WC 7.7.0

public function delete_customer( $id ) {

	$id = $this->validate_request( $id, 'customer', 'delete' );

	if ( ! is_wp_error( $id ) ) {
		return $id;
	}

	return $this->delete( $id, 'customer' );
}