WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

WC_Session_Handler::set_customer_session_cookie() public WC 1.0

Sets the session cookie on-demand (usually after adding an item to the cart).

Since the cookie name (as of 2.1) is prepended with wp, cache systems like batcache will not cache pages when set.

Warning: Cookies will only be set if this is called before the headers are sent.

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

Хуков нет.

Возвращает

Null. Ничего.

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

$WC_Session_Handler = new WC_Session_Handler();
$WC_Session_Handler->set_customer_session_cookie( $set );
$set(true/false) (обязательный)
Should the session cookie be set.

Код WC_Session_Handler::set_customer_session_cookie() WC 4.7.1

<?php
public function set_customer_session_cookie( $set ) {
	if ( $set ) {
		$to_hash           = $this->_customer_id . '|' . $this->_session_expiration;
		$cookie_hash       = hash_hmac( 'md5', $to_hash, wp_hash( $to_hash ) );
		$cookie_value      = $this->_customer_id . '||' . $this->_session_expiration . '||' . $this->_session_expiring . '||' . $cookie_hash;
		$this->_has_cookie = true;

		if ( ! isset( $_COOKIE[ $this->_cookie ] ) || $_COOKIE[ $this->_cookie ] !== $cookie_value ) {
			wc_setcookie( $this->_cookie, $cookie_value, $this->_session_expiration, $this->use_secure_cookie(), true );
		}
	}
}