Automattic\WooCommerce\Admin\API

Notice::register_routes()publicWC 1.0

Register the routes for admin notes.

Метод класса: Notice{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

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

Код Notice::register_routes() WC 9.3.3

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' ),
			),
		)
	);
}