Automattic\WooCommerce\Internal\Orders

OrderActionsRestController::register_routes()publicWC 1.0

Register the REST API endpoints handled by this controller.

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

Хуков нет.

Возвращает

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

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

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

Код OrderActionsRestController::register_routes() WC 9.5.1

public function register_routes() {
	register_rest_route(
		$this->route_namespace,
		'/orders/(?P<id>[\d]+)/actions/send_order_details',
		array(
			array(
				'methods'             => \WP_REST_Server::CREATABLE,
				'callback'            => fn( $request ) => $this->run( $request, 'send_order_details' ),
				'permission_callback' => fn( $request ) => $this->check_permissions( $request ),
				'args'                => $this->get_args_for_order_actions(),
				'schema'              => $this->get_schema_for_order_actions(),
			),
		)
	);
}