Automattic\WooCommerce\RestApi
Server::register_rest_routes()
Register REST API routes.
Метод класса: Server{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Server = new Server(); $Server->register_rest_routes();
Код Server::register_rest_routes() Server::register rest routes WC 9.3.3
public function register_rest_routes() { $container = wc_get_container(); $legacy_proxy = $container->get( LegacyProxy::class ); foreach ( $this->get_rest_namespaces() as $namespace => $controllers ) { foreach ( $controllers as $controller_name => $controller_class ) { $this->controllers[ $namespace ][ $controller_name ] = $container->has( $controller_class ) ? $container->get( $controller_class ) : $legacy_proxy->get_instance_of( $controller_class ); $this->controllers[ $namespace ][ $controller_name ]->register_routes(); } } }