Automattic\WooCommerce\StoreApi
Authentication::get_cart_token
Gets the cart token from the request header.
Метод класса: Authentication{}
Хуков нет.
Возвращает
string.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_cart_token( $request );
- $request(WP_REST_Request) (обязательный)
- Deprecated since 11.1.0. Unused; kept for subclasses.
Код Authentication::get_cart_token() Authentication::get cart token WC 11.2.2
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();
}