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.
Method of the class: Authentication{}
No Hooks.
Returns
Array.
Usage
$Authentication = new Authentication(); $Authentication->exposed_cors_headers( $exposed_headers );
- $exposed_headers(array) (required)
- Exposed headers.
Authentication::exposed_cors_headers() Authentication::exposed cors headers code WC 10.7.0
public function exposed_cors_headers( $exposed_headers ) {
$exposed_headers[] = 'Cart-Token';
return $exposed_headers;
}