Automattic\WooCommerce\Admin\API\Reports\Export

Controller::register_routes()publicWC 1.0

Register routes.

{} Это метод класса: Controller{}

Хуков нет.

Возвращает

null. Ничего.

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

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

Код Controller::register_routes() WC 6.6.1

public function register_routes() {
	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base,
		array(
			array(
				'methods'             => \WP_REST_Server::EDITABLE,
				'callback'            => array( $this, 'export_items' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
				'args'                => $this->get_export_collection_params(),
			),
			'schema' => array( $this, 'get_export_public_schema' ),
		)
	);

	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/(?P<export_id>[a-z0-9]+)/status',
		array(
			array(
				'methods'             => \WP_REST_Server::READABLE,
				'callback'            => array( $this, 'export_status' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
			),
			'schema' => array( $this, 'get_export_status_public_schema' ),
		)
	);
}