WC_Customer_Data_Store_Session::delete
Deletes the customer session.
Method of the class: WC_Customer_Data_Store_Session{}
No Hooks.
Returns
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() WC Customer Data Store Session::delete code WC 10.5.0
public function delete( &$customer, $args = array() ) {
WC()->session->set( 'customer', null );
}