Automattic\WooCommerce\StoreApi

Authentication::get_cart_tokenprotectedWC 1.0

Gets the cart token from the request header.

Method of the class: Authentication{}

No Hooks.

Returns

string.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_cart_token( $request );
$request(WP_REST_Request) (required)
Deprecated since 11.1.0. Unused; kept for subclasses.

Authentication::get_cart_token() code WC 11.0.1

protected function get_cart_token( \WP_REST_Request $request ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found -- Signature kept for backwards compatibility.
	return CartTokenUtils::get_request_cart_token();
}