WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API

ProductVariations::register_routes() public WC 1.0

Register the routes for products.

{} It's a method of the class: ProductVariations{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of ProductVariations::register_routes() WC 5.3.0

<?php
public function register_routes() {
	parent::register_routes();

	// Add a route for listing variations without specifying the parent product ID.
	register_rest_route(
		$this->namespace,
		'/variations',
		array(
			array(
				'methods'             => \WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_items' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
				'args'                => $this->get_collection_params(),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);
}