WC_Session_Handler::use_secure_cookieprotectedWC 3.6.0

Should the session cookie be secure?

Method of the class: WC_Session_Handler{}

Hooks from the method

Returns

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->use_secure_cookie();

Changelog

Since 3.6.0 Introduced.

WC_Session_Handler::use_secure_cookie() code WC 10.3.3

protected function use_secure_cookie() {
	/**
	 * Filter whether to use a secure cookie.
	 *
	 * @since 3.6.0
	 *
	 * @param bool $use_secure_cookie Whether to use a secure cookie.
	 */
	return (bool) apply_filters( 'wc_session_use_secure_cookie', wc_site_is_https() && is_ssl() );
}