Automattic\WooCommerce\StoreApi

Authentication::set_logged_in_cookie()publicWC 1.0

When the login cookies are set, they are not available until the next page reload. For the Store API, specifically for returning updated nonces, we need this to be available immediately.

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

Хуков нет.

Возвращает

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

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

$Authentication = new Authentication();
$Authentication->set_logged_in_cookie( $logged_in_cookie );
$logged_in_cookie(строка) (обязательный)
The value for the logged in cookie.

Код Authentication::set_logged_in_cookie() WC 8.7.0

public function set_logged_in_cookie( $logged_in_cookie ) {
	if ( ! defined( 'LOGGED_IN_COOKIE' ) ) {
		return;
	}
	$_COOKIE[ LOGGED_IN_COOKIE ] = $logged_in_cookie;
}