Automattic\WooCommerce\Admin\API

Experiments::register_routes()publicWC 1.0

Register routes.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of Experiments::register_routes() WC 6.6.1

public function register_routes() {
	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/assignment',
		array(
			array(
				'methods'             => \WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_assignment' ),
				'permission_callback' => array( $this, 'get_item_permissions_check' ),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);
}