WordPress at Your Fingertips
function is not described

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.

{} It's a method of the class: RestApi{}

No Hooks.

Return

null. Nothing.

Usage

$RestApi = new RestApi();
$RestApi->store_api_logged_in_cookie( $logged_in_cookie );
$logged_in_cookie(string) (required)
The value for the logged in cookie.

Code of RestApi::store_api_logged_in_cookie() WC 5.7.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;
}