WC_REST_Controller::get_endpoint_args_for_item_schema()publicWC 1.0

Compatibility functions for WP 5.5, since custom types are not supported anymore. See @link https://core.trac.wordpress.org/changeset/48306

Метод класса: WC_REST_Controller{}

Хуков нет.

Возвращает

Массив. Endpoint arguments.

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

$WC_REST_Controller = new WC_REST_Controller();
$WC_REST_Controller->get_endpoint_args_for_item_schema( $method );
$method(строка)
HTTP method of the request.
По умолчанию: WP_REST_Server::CREATABLE

Код WC_REST_Controller::get_endpoint_args_for_item_schema() WC 7.1.0

public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) {

	$endpoint_args = parent::get_endpoint_args_for_item_schema( $method );

	if ( false === strpos( WP_REST_Server::EDITABLE, $method ) ) {
		return $endpoint_args;
	}

	$endpoint_args = $this->adjust_wp_5_5_datatype_compatibility( $endpoint_args );

	return $endpoint_args;
}