WordPress at a glance
function is not described

wc_delete_user_data() WC 1.0

When a user is deleted in WordPress, delete corresponding WooCommerce data.

No Hooks.

Return

null. Nothing.

Usage

wc_delete_user_data( $user_id );
$user_id(int) (required)
User ID being deleted.

Code of wc_delete_user_data() WC 5.3.0

<?php
function wc_delete_user_data( $user_id ) {
	global $wpdb;

	// Clean up sessions.
	$wpdb->delete(
		$wpdb->prefix . 'woocommerce_sessions',
		array(
			'session_key' => $user_id,
		)
	);

	// Revoke API keys.
	$wpdb->delete(
		$wpdb->prefix . 'woocommerce_api_keys',
		array(
			'user_id' => $user_id,
		)
	);

	// Clean up payment tokens.
	$payment_tokens = WC_Payment_Tokens::get_customer_tokens( $user_id );

	foreach ( $payment_tokens as $payment_token ) {
		$payment_token->delete();
	}
}