WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API

Marketing::register_routes() public WC 1.0

Register routes.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of Marketing::register_routes() WC 5.2.2

<?php
public function register_routes() {
	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/recommended',
		array(
			array(
				'methods'             => \WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_recommended_plugins' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
				'args'                => array(
					'per_page' => $this->get_collection_params()['per_page'],
					'category' => array(
						'type'              => 'string',
						'validate_callback' => 'rest_validate_request_arg',
						'sanitize_callback' => 'sanitize_title_with_dashes',
					),
				),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);

	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/knowledge-base',
		array(
			array(
				'methods'             => \WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_knowledge_base_posts' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
				'args'                => array(
					'category' => array(
						'type'              => 'string',
						'validate_callback' => 'rest_validate_request_arg',
						'sanitize_callback' => 'sanitize_title_with_dashes',
					),
				),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);
}