Automattic\WooCommerce\RestApi

Server::register_rest_routes()publicWC 1.0

Register REST API routes.

{} Это метод класса: Server{}

Хуков нет.

Возвращает

null. Ничего.

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

$Server = new Server();
$Server->register_rest_routes();

Код Server::register_rest_routes() WC 7.1.0

public function register_rest_routes() {
	foreach ( $this->get_rest_namespaces() as $namespace => $controllers ) {
		foreach ( $controllers as $controller_name => $controller_class ) {
			$this->controllers[ $namespace ][ $controller_name ] = new $controller_class();
			$this->controllers[ $namespace ][ $controller_name ]->register_routes();
		}
	}
}