Automattic\WooCommerce\Admin\API
Themes::register_routes
Register routes.
Method of the class: Themes{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Themes = new Themes(); $Themes->register_routes();
Themes::register_routes() Themes::register routes code WC 11.1.1
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' ),
)
);
}