WC_Customer::delete_and_reassign
Delete a customer and reassign posts..
Метод класса: WC_Customer{}
Хуков нет.
Возвращает
bool.
Использование
$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 Customer::delete and reassign WC 11.3.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;
}