Automattic\WooCommerce\Admin\API

Themes::register_routes()publicWC 1.0

Register routes.

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

Хуков нет.

Возвращает

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

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

$Themes = new Themes();
$Themes->register_routes();

Код Themes::register_routes() WC 8.7.0

public function register_routes() {
	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base,
		array(
			array(
				'methods'             => \WP_REST_Server::EDITABLE,
				'callback'            => array( $this, 'upload_theme' ),
				'permission_callback' => array( $this, 'upload_theme_permissions_check' ),
				'args'                => $this->get_collection_params(),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);
}