WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API

ProductAttributes::register_routes() public WC 1.0

Register the routes for custom product attributes.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of ProductAttributes::register_routes() WC 5.3.0

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

	register_rest_route(
		$this->namespace,
		'products/attributes/(?P<slug>[a-z0-9_\-]+)',
		array(
			'args'   => array(
				'slug' => array(
					'description' => __( 'Slug identifier for the resource.', 'woocommerce' ),
					'type'        => 'string',
				),
			),
			array(
				'methods'             => \WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_item_by_slug' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);
}