WordPress at a glance
function is not described

WC_API_Server::header() public WC 2.1

Send a HTTP header

{} It's a method of the class: WC_API_Server{}

No Hooks.

Return

Null. Nothing.

Usage

$WC_API_Server = new WC_API_Server();
$WC_API_Server->header( $key, $value, $replace );
$key(string) (required)
Header key
$value(string) (required)
Header value
$replace(true/false)
Should we replace the existing header?

Changelog

Since 2.1 Introduced.

Code of WC_API_Server::header() WC 5.0.0

<?php
public function header( $key, $value, $replace = true ) {
	header( sprintf( '%s: %s', $key, $value ), $replace );
}