Automattic\WooCommerce\Admin\API

MobileAppMagicLink::register_routes()publicWC 7.0.0

Register routes.

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

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 7.0.0 Introduced.

Code of MobileAppMagicLink::register_routes() WC 7.1.0

public function register_routes() {
	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/send-magic-link',
		array(
			array(
				'methods'             => \WP_REST_Server::READABLE,
				'callback'            => array( $this, 'send_magic_link' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		)
	);

	parent::register_routes();
}