Skip to content

Commit

Permalink
Fix digital wallets on block checkout for WC 9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Sep 10, 2024
1 parent 5c5f2d7 commit 70dd3ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/blocks/digital-wallets/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ const Content = ( {
onClose();
} else {
setTokenResult( __tokenResult );
onSubmit();
// Use setTimeout to ensure the tokenResult is set before calling onSubmit. (TODO: find a better way handle this).
setTimeout( () => {
onSubmit();
}, 0 );
}
} )();
}
Expand Down

0 comments on commit 70dd3ae

Please sign in to comment.