Automattic\WooCommerce\StoreApi
Authentication::exposed_cors_headers
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() Authentication::exposed cors headers WC 11.0.1
public function exposed_cors_headers( $exposed_headers ) {
$exposed_headers[] = 'Cart-Token';
return $exposed_headers;
}