WC_Customer::delete_and_reassign()
Delete a customer and reassign posts..
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. |
WC_Customer::delete_and_reassign() WC Customer::delete and reassign code WC 9.3.1
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; }