Automattic\WooCommerce\StoreApi

Authentication::exposed_cors_headerspublicWC 1.0

Expose Store API headers in CORS responses. We're explicitly exposing the Cart-Token, not the nonce. Only one of them is needed.

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

Хуков нет.

Возвращает

Массив.

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

$Authentication = new Authentication();
$Authentication->exposed_cors_headers( $exposed_headers );
$exposed_headers(массив) (обязательный)
Exposed headers.

Код Authentication::exposed_cors_headers() WC 10.0.2

public function exposed_cors_headers( $exposed_headers ) {
	$exposed_headers[] = 'Cart-Token';
	return $exposed_headers;
}