WordPress at a glance
функция не описана

WP_REST_Request::set_method() public WP 4.4.0

Sets HTTP method for the request.

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

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WP_REST_Request = new WP_REST_Request();
$WP_REST_Request->set_method( $method );
$method(string) (required)
HTTP method.

Changelog

Since 4.4.0 Introduced.

Код WP_REST_Request::set_method() WP 5.5.1

<?php
public function set_method( $method ) {
	$this->method = strtoupper( $method );
}