WC_Customer_Data_Store_Session::delete()publicWC 3.0.0

Deletes the customer session.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$WC_Customer_Data_Store_Session = new WC_Customer_Data_Store_Session();
$WC_Customer_Data_Store_Session->delete( $customer, $args );
$customer(WC_Customer) (обязательный) (передается по ссылке — &)
Customer object.
$args(массив)
Array of args to pass to the delete method.
По умолчанию: array()

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

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

Код WC_Customer_Data_Store_Session::delete() WC 8.7.0

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