Automattic\WooCommerce\Internal\Orders
OrderActionsRestController::run
Handle a request for one of the provided REST API endpoints.
Метод класса: OrderActionsRestController{}
Хуков нет.
Возвращает
WP_REST_Response|WP_Error.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->run( $request, $method_name );
- $request(WP_REST_Request) (обязательный)
- The incoming HTTP REST request.
- $method_name(строка) (обязательный)
- The name of the class method to execute.
Код OrderActionsRestController::run() OrderActionsRestController::run WC 10.8.1
protected function run( WP_REST_Request $request, string $method_name ) {
$order_id = $this->validate_order_id( $request );
if ( is_wp_error( $order_id ) ) {
return $order_id;
}
return parent::run( $request, $method_name );
}