Automattic\WooCommerce\Blocks
RestApi::store_api_logged_in_cookie() public WC 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.
{} Это метод класса: RestApi{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$RestApi = new RestApi(); $RestApi->store_api_logged_in_cookie( $logged_in_cookie );
- $logged_in_cookie(строка) (обязательный)
- The value for the logged in cookie.
Код RestApi::store_api_logged_in_cookie() RestApi::store api logged in cookie WC 5.0.0
public function store_api_logged_in_cookie( $logged_in_cookie ) {
if ( ! defined( 'LOGGED_IN_COOKIE' ) || ! self::is_request_to_store_api() ) {
return;
}
$_COOKIE[ LOGGED_IN_COOKIE ] = $logged_in_cookie;
}