WP_HTTP_Response::set_data()publicWP 4.4.0

Sets the response data.

Method of the class: WP_HTTP_Response{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_HTTP_Response = new WP_HTTP_Response();
$WP_HTTP_Response->set_data( $data );
$data(mixed) (required)
Response data.

Changelog

Since 4.4.0 Introduced.

WP_HTTP_Response::set_data() code WP 6.5.4

public function set_data( $data ) {
	$this->data = $data;
}