Automattic\WooCommerce\StoreApi
Authentication::allowed_cors_headers
Add allowed cors headers for store API headers.
Method of the class: Authentication{}
No Hooks.
Returns
Array.
Usage
$Authentication = new Authentication(); $Authentication->allowed_cors_headers( $allowed_headers );
- $allowed_headers(array) (required)
- Allowed headers.
Authentication::allowed_cors_headers() Authentication::allowed cors headers code WC 10.7.0
public function allowed_cors_headers( $allowed_headers ) {
$allowed_headers[] = 'Cart-Token';
$allowed_headers[] = 'Nonce';
return $allowed_headers;
}