WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API

OnboardingTasks::register_routes() public WC 1.0

Register routes.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of OnboardingTasks::register_routes() WC 5.3.0

<?php
public function register_routes() {
	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/import_sample_products',
		array(
			array(
				'methods'             => \WP_REST_Server::CREATABLE,
				'callback'            => array( $this, 'import_sample_products' ),
				'permission_callback' => array( $this, 'create_products_permission_check' ),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);

	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/create_homepage',
		array(
			array(
				'methods'             => \WP_REST_Server::CREATABLE,
				'callback'            => array( $this, 'create_homepage' ),
				'permission_callback' => array( $this, 'create_pages_permission_check' ),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);

	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/status',
		array(
			array(
				'methods'             => \WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_status' ),
				'permission_callback' => array( $this, 'get_status_permission_check' ),
			),
			'schema' => array( $this, 'get_status_item_schema' ),
		)
	);

	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/create_product_from_template',
		array(
			array(
				'methods'             => \WP_REST_Server::CREATABLE,
				'callback'            => array( $this, 'create_product_from_template' ),
				'permission_callback' => array( $this, 'create_products_permission_check' ),
				'args'                => array_merge(
					$this->get_endpoint_args_for_item_schema( \WP_REST_Server::CREATABLE ),
					array(
						'template_name' => array(
							'required'    => true,
							'type'        => 'string',
							'description' => __( 'Product template name.', 'woocommerce' ),
						),
					)
				),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);
}