WC_Session_Handler::update_session_timestamp()publicWC 1.0

Update the session expiry timestamp.

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

Хуков нет.

Возвращает

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

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

$WC_Session_Handler = new WC_Session_Handler();
$WC_Session_Handler->update_session_timestamp( $customer_id, $timestamp );
$customer_id(строка) (обязательный)
Customer ID.
$timestamp(int) (обязательный)
Timestamp to expire the cookie.

Код WC_Session_Handler::update_session_timestamp() WC 8.7.0

public function update_session_timestamp( $customer_id, $timestamp ) {
	global $wpdb;

	$wpdb->update(
		$this->_table,
		array(
			'session_expiry' => $timestamp,
		),
		array(
			'session_key' => $customer_id,
		),
		array(
			'%d',
		)
	);
}