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

wc_setcookie() WC 1.0

Set a cookie - wrapper for setcookie using WP constants.

Хуки из функции

Null. Ничего.


wc_setcookie( $name, $value, $expire, $secure, $httponly );
$name(строка) (обязательный)
Name of the cookie being set.
$value(строка) (обязательный)
Value of the cookie.
Expiry of the cookie.
По умолчанию: 0
Whether the cookie should be served only over https.
По умолчанию: false
Whether the cookie is only accessible over HTTP, not scripting languages like JavaScript. @since 3.6.0.
По умолчанию: false

Код wc setcookie: woocommerce/includes/wc-core-functions.php WC 4.3.1

function wc_setcookie( $name, $value, $expire = 0, $secure = false, $httponly = false ) {
	if ( ! headers_sent() ) {
		setcookie( $name, $value, $expire, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, $secure, apply_filters( 'woocommerce_cookie_httponly', $httponly, $name, $value, $expire, $secure ) );
	} elseif ( Constants::is_true( 'WP_DEBUG' ) ) {
		headers_sent( $file, $line );
		trigger_error( "{$name} cookie cannot be set - headers already sent by {$file} on line {$line}", E_USER_NOTICE ); // @codingStandardsIgnoreLine