Skip to content

Commit

Permalink
Merge branch 'release/T24.hydra.1' into task/version-bump-release/T24…
Browse files Browse the repository at this point in the history
….hydra.1-24444c0
  • Loading branch information
rafsuntaskin authored Jan 7, 2025
2 parents b6494ae + 4403243 commit e556eb3
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 9 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-et-2279-stripe-duplicate-attendees
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Fixed duplication of attendees while using Stripe webhooks with TicketsCommerce. [ET-2279]
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

0 comments on commit e556eb3

Please sign in to comment.