From 90e513b893fce394a83640a01471c96045eac983 Mon Sep 17 00:00:00 2001 From: Ricardo Metring Date: Tue, 28 Sep 2021 12:30:48 -0300 Subject: [PATCH] Fix free orders missing payment method (#4854) --- src/StoreApi/Routes/Checkout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StoreApi/Routes/Checkout.php b/src/StoreApi/Routes/Checkout.php index 1f39ce1aeee..4f035227983 100644 --- a/src/StoreApi/Routes/Checkout.php +++ b/src/StoreApi/Routes/Checkout.php @@ -461,7 +461,7 @@ private function update_customer_from_request( \WP_REST_Request $request ) { */ private function update_order_from_request( \WP_REST_Request $request ) { $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->set_payment_method( $this->get_request_payment_method( $request ) ); /** * WooCommerce Blocks Checkout Update Order From Request (experimental).