WC_Customer_Data_Store_Session::delete()publicWC 3.0.0

Deletes the customer session.

Method of the class: WC_Customer_Data_Store_Session{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Customer_Data_Store_Session = new WC_Customer_Data_Store_Session();
$WC_Customer_Data_Store_Session->delete( $customer, $args );
$customer(WC_Customer) (required) (passed by reference — &)
Customer object.
$args(array)
Array of args to pass to the delete method.
Default: array()

Changelog

Since 3.0.0 Introduced.

WC_Customer_Data_Store_Session::delete() code WC 8.7.0

public function delete( &$customer, $args = array() ) {
	WC()->session->set( 'customer', null );
}