WordPress at a glance
function is not described

WC_Customer_Data_Store::delete() public WC 3.0.0

Deletes a customer from the database.

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

Hooks from the method
Return

null. Nothing.

Usage

$WC_Customer_Data_Store = new WC_Customer_Data_Store();
$WC_Customer_Data_Store->delete( $customer, $args );
$customer(WC_Customer) (required)
Customer object.
$args(array)
Array of args to pass to the delete method.

Changelog

Since 3.0.0 Introduced.

Code of WC_Customer_Data_Store::delete() WC 5.3.0

<?php
public function delete( &$customer, $args = array() ) {
	if ( ! $customer->get_id() ) {
		return;
	}

	$args = wp_parse_args(
		$args,
		array(
			'reassign' => 0,
		)
	);

	$id = $customer->get_id();
	wp_delete_user( $id, $args['reassign'] );

	do_action( 'woocommerce_delete_customer', $id );
}