Automattic\WooCommerce\Blocks\StoreApi\Routes
Checkout::update_order_from_request() private WC 1.0
Update the current order using the posted values from the request.
{} Это метод класса: Checkout{}
Хуков нет.
Возвращает
null
. Null. Ничего.
Использование
// private - только в коде основоного (родительского) класса $result = $this->update_order_from_request( $request );
- $request(WP_REST_Request) (обязательный)
- Full details about the request.
Код Checkout::update_order_from_request() Checkout::update order from request WC 5.2.0
private function update_order_from_request( WP_REST_Request $request ) {
if ( isset( $request['customer_note'] ) ) {
$this->order->set_customer_note( $request['customer_note'] );
}
$this->order->set_payment_method( $this->order->needs_payment() ? $this->get_request_payment_method( $request ) : '' );
$this->order->save();
}