WC_Customer::delete_and_reassign()publicWC 3.0.0

Delete a customer and reassign posts..

Метод класса: WC_Customer{}

Хуков нет.

Возвращает

true|false.

Использование

$WC_Customer = new WC_Customer();
$WC_Customer->delete_and_reassign( $reassign );
$reassign(int)
Reassign posts and links to new User ID.
По умолчанию: null

Список изменений

С версии 3.0.0 Введена.

Код WC_Customer::delete_and_reassign() WC 8.7.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;
}