WC_Customer::delete_and_reassign( int $reassign = null )

Delete a customer and reassign posts.


Description Description

.


Parameters Parameters

$reassign

(Optional) Reassign posts and links to new User ID.

Default value: null


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/class-wc-customer.php

	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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.