Automattic\WooCommerce\RestApi

Server::register_rest_routes()publicWC 1.0

Register REST API routes.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Код Server::register_rest_routes() WC 8.1.1

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();
		}
	}
}