Automattic\WooCommerce\Admin\API

Themes::register_routes()publicWC 1.0

Register routes.

Method of the class: Themes{}

No Hooks.

Return

null. Nothing.

Usage

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

Themes::register_routes() code WC 7.3.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' ),
		)
	);
}