Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Revert "Fix free orders missing payment method (#4854)"
Browse files Browse the repository at this point in the history
This reverts commit 90e513b.
  • Loading branch information
senadir committed Oct 26, 2021
1 parent 34e367f commit b81c3a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StoreApi/Routes/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,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->get_request_payment_method( $request ) );
$this->order->set_payment_method( $this->order->needs_payment() ? $this->get_request_payment_method( $request ) : '' );

/**
* Fires when the Checkout Block/Store API updates an order's from the API request data.
Expand Down

0 comments on commit b81c3a9

Please sign in to comment.