Automattic\WooCommerce\Admin\API
Experiments::register_routes
Register routes.
Method of the class: Experiments{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Experiments = new Experiments(); $Experiments->register_routes();
Experiments::register_routes() Experiments::register routes code WC 11.0.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' ),
)
);
}