WC_REST_WCCOM_Site_Connection_Controller::register_routes
Register the routes for Site Connection Controller.
Method of the class: WC_REST_WCCOM_Site_Connection_Controller{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_REST_WCCOM_Site_Connection_Controller = new WC_REST_WCCOM_Site_Connection_Controller(); $WC_REST_WCCOM_Site_Connection_Controller->register_routes();
Changelog
| Since 9.6.0 | Introduced. |
WC_REST_WCCOM_Site_Connection_Controller::register_routes() WC REST WCCOM Site Connection Controller::register routes code WC 10.8.1
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/disconnect',
array(
array(
'methods' => WP_REST_Server::EDITABLE,
'callback' => array( $this, 'handle_disconnect_request' ),
'permission_callback' => array( $this, 'check_permission' ),
),
),
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/status',
array(
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'handle_status_request' ),
'permission_callback' => array( $this, 'check_permission' ),
),
),
);
}