Skip to content

Commit

Permalink
Merge branch 'develop' into fix/6567-user-set-date-and-time-formattin…
Browse files Browse the repository at this point in the history
…g-arent-respected-in-react-components
  • Loading branch information
mgascam authored Dec 20, 2024
2 parents 986cc5b + 3c7b115 commit 5bd6f5f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-9735-render-transactions-correctly-on-capture
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Ensure captured transactions appear in the Transactions tab without requiring a page refresh.
7 changes: 7 additions & 0 deletions client/data/authorizations/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ export function* submitCaptureAuthorization(
'getPaymentIntent'
);

// Need to invalidate transactions tab to update newly captured transaction if needed.
yield controls.dispatch(
STORE_NAME,
'invalidateResolutionForStoreSelector',
'getTransactions'
);

// Create success notice.
yield controls.dispatch(
'core/notices',
Expand Down
8 changes: 8 additions & 0 deletions client/data/authorizations/test/actions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ describe( 'Authorizations actions', () => {
)
);

expect( generator.next().value ).toEqual(
controls.dispatch(
'wc/payments',
'invalidateResolutionForStoreSelector',
'getTransactions'
)
);

expect( generator.next().value ).toEqual(
controls.dispatch(
'core/notices',
Expand Down

0 comments on commit 5bd6f5f

Please sign in to comment.