WordPress at Your Fingertips
function is not described

WC_Customer::delete_and_reassign() public WC 3.0.0

Delete a customer and reassign posts..

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

No Hooks.

Return

true|false.

Usage

$WC_Customer = new WC_Customer();
$WC_Customer->delete_and_reassign( $reassign );
$reassign(int)
Reassign posts and links to new User ID.
Default: null

Changelog

Since 3.0.0 Introduced.

Code of WC_Customer::delete_and_reassign() WC 6.1.0

public function delete_and_reassign( $reassign = null ) {
	if ( $this->data_store ) {
		$this->data_store->delete(
			$this,
			array(
				'force_delete' => true,
				'reassign'     => $reassign,
			)
		);
		$this->set_id( 0 );
		return true;
	}
	return false;
}