Automattic\WooCommerce\Internal\Admin\Emails

EmailListingRestController::register_routes │ public │ WC 1.0

Register the REST API endpoints handled by this controller.

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

Хуков нет.

Возвращает

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

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

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

Код EmailListingRestController::register_routes() WC 11.3.0

public function register_routes() {
	register_rest_route(
		$this->route_namespace,
		'/' . $this->rest_base . '/recreate-email-post',
		array(
			array(
				'methods'             => \WP_REST_Server::CREATABLE,
				'callback'            => fn( $request ) => $this->recreate_email_post( $request ),
				'permission_callback' => fn( $request ) => $this->check_permissions( $request ),
				'args'                => $this->get_args_for_recreate_email_post(),
				'schema'              => $this->get_schema_with_message(),
			),
		)
	);
}