Automattic\WooCommerce\Admin\API
Notice::register_routes
Register the routes for admin notes.
Method of the class: Notice{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Notice = new Notice(); $Notice->register_routes();
Notice::register_routes() Notice::register routes code WC 11.0.1
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/dismiss',
array(
array(
'methods' => 'POST',
'callback' => array( $this, 'dissmiss_notice' ),
'permission_callback' => array( $this, 'get_permission' ),
),
)
);
}