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

[ET-2279] Fix - Stripe webhooks generating duplicate attendees. #3469

Merged
Merged
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ protected static function get_payment_intent_data( array $event ): array {
*
* @since 5.3.0
* @since 5.16.0 Remove deprecation notice.
* @since 5.18.0 Only check matching payment intent ids if they are not pending or action required.
* @since 5.18.0 Only check matching payment intent ids if they are not pending or action required.
* @since TBD Removed the check for the payment intent status for pending or action required.
*
* @param array $payment_intent_received The payment intent data received
* @param array[] $payment_intents_stored The payment intent data stored from each update, keyed by status.
Expand All @@ -135,11 +136,6 @@ public static function should_payment_intent_be_updated( $payment_intent_receive
}

foreach ( $payment_intents_stored as $status => $intents ) {
// Skip if the status is pending or action required.
if ( in_array( $status, [ Pending::SLUG, Action_Required::SLUG ], true ) ) {
continue;
}

foreach( $intents as $intent ) {
// This payment intent has already been processed and updated.
if ( $payment_intent_received['id'] === $intent['id'] ) {
Expand Down
Loading