Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate order notes/emails on subscription renewal orders #3572

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Add - Add support for Stripe Link payments via the new Stripe Checkout Element on the product, cart, checkout and pay for order pages.
* Add - Show ECE button preview on settings page.
* Tweak - Remove the subscription order notes added each time a source wasn't migrated.
* Fix - Prevent marking renewal orders as processing/completed multiple times due to handling the Stripe webhook in parallel.

= 8.8.1 - 2024-10-28 =
* Tweak - Disables APMs when using the legacy checkout experience due Stripe deprecation by October 29, 2024.
Expand Down
9 changes: 4 additions & 5 deletions includes/compat/trait-wc-stripe-subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,18 +499,15 @@ public function process_subscription_payment( $amount, $renewal_order, $retry =

throw new WC_Stripe_Exception( print_r( $response, true ), $localized_message );
}

// TODO: Remove when SEPA is migrated to payment intents.
if ( 'stripe_sepa' !== $this->id ) {
$this->unlock_order_payment( $renewal_order );
}
} catch ( WC_Stripe_Exception $e ) {
WC_Stripe_Logger::log( 'Error: ' . $e->getMessage() );

do_action( 'wc_gateway_stripe_process_payment_error', $e, $renewal_order );

/* translators: error message */
$renewal_order->update_status( 'failed' );
$this->unlock_order_payment( $renewal_order );

return;
}

Expand Down Expand Up @@ -561,6 +558,8 @@ public function process_subscription_payment( $amount, $renewal_order, $retry =

do_action( 'wc_gateway_stripe_process_payment_error', $e, $renewal_order );
}

$this->unlock_order_payment( $renewal_order );
}

/**
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,6 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
* Add - Add support for Stripe Link payments via the new Stripe Checkout Element on the product, cart, checkout and pay for order pages.
* Add - Show ECE button preview on settings page.
* Tweak - Remove the subscription order notes added each time a source wasn't migrated.
* Fix - Prevent marking renewal orders as processing/completed multiple times due to handling the Stripe webhook in parallel.

[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).
Loading