Skip to content

Commit 4468d29

Browse files
authored
Fix double order note issue (#3331)
1 parent cd3bb55 commit 4468d29

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* Tweak - Minor text updates to webhook-related configuration labels and buttons.
2525
* Tweak - Improve UX by using the 3DS verification modal to confirm setup intents for subscription sign-ups, ensuring customers stay on the checkout page.
2626
* Tweak - Display a notice when the Stripe connect URL is not available.
27+
* Fix - Prevent adding multiple copies of the same order notes.
2728
* Tweak - Automatically configure webhooks after completing the OAuth Stripe flow.
2829
* Tweak - Don't process webhooks when the webhook secret isn't set in the store.
2930

includes/payment-methods/class-wc-stripe-upe-payment-gateway.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@ private function process_payment_with_deferred_intent( int $order_id ) {
838838
// Throw an exception if the minimum order amount isn't met.
839839
$this->validate_minimum_order_amount( $order );
840840

841+
$this->lock_order_payment( $order );
841842
// Create a payment intent, or update an existing one associated with the order.
842843
$payment_intent = $this->process_payment_intent_for_order( $order, $payment_information );
843844
} else {
@@ -950,6 +951,8 @@ private function process_payment_with_deferred_intent( int $order_id ) {
950951
}
951952
}
952953

954+
$this->unlock_order_payment( $order );
955+
953956
return array_merge(
954957
[
955958
'result' => 'success',

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ If you get stuck, you can ask for help in the Plugin Forum.
152152
* Tweak - Minor text updates to webhook-related configuration labels and buttons.
153153
* Tweak - Improve UX by using the 3DS verification modal to confirm setup intents for subscription sign-ups, ensuring customers stay on the checkout page.
154154
* Tweak - Display a notice when the Stripe connect URL is not available.
155+
* Fix - Prevent adding multiple copies of the same order notes.
155156
* Tweak - Automatically configure webhooks after completing the OAuth Stripe flow.
156157
* Tweak - Don't process webhooks when the webhook secret isn't set in the store.
157158

0 commit comments

Comments
 (0)