-
Notifications
You must be signed in to change notification settings - Fork 69
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
Settings - Display erroring bank notice on Settings > Payments > Deposits #9482
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +290 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
client/settings/deposits/index.js
Outdated
const { account, overview } = useSelectedCurrencyOverview(); | ||
const selectedCurrency = | ||
overview?.currency || wcpaySettings.accountDefaultCurrency; | ||
|
||
const hasErroredExternalAccount = | ||
account?.default_external_accounts?.some( | ||
( externalAccount ) => | ||
externalAccount.currency === selectedCurrency && | ||
externalAccount.status === 'errored' | ||
) ?? false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 I found that when I used a multi-deposit-currency store, this notice did not display, and there is no way to see to change which currency is selected on the settings page.
What do you think about making this display if any deposit currency's default deposit account is in an errored
state?
const { account, overview } = useSelectedCurrencyOverview(); | |
const selectedCurrency = | |
overview?.currency || wcpaySettings.accountDefaultCurrency; | |
const hasErroredExternalAccount = | |
account?.default_external_accounts?.some( | |
( externalAccount ) => | |
externalAccount.currency === selectedCurrency && | |
externalAccount.status === 'errored' | |
) ?? false; | |
const { overviews } = useAllDepositsOverviews(); | |
const hasErroredExternalAccount = | |
overviews.account?.default_external_accounts?.some( | |
( externalAccount ) => externalAccount.status === 'errored' | |
) ?? false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about making this display if any deposit currency's default deposit account is in an errored state?
Thanks for testing this with a multi-currency account! what you shared here makes sense!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this with a multi-deposit-currency store with a single errored deposit destination.
I did a round of manual test this time with a similar account, and it seems to work as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @nagpai 🌟
I've tested this with a multi-deposit-currency store with a single errored
deposit destination.
I've left a suggestion to show merchants this if any deposit currency's destination is errored
, rather than just the "selected" currency.
Other than that, this is a great addition for merchants on the Payments settings screen.
Fixes #8331
Changes proposed in this Pull Request
The PR adds a notice to
Settings > Payments > Deposits
to inform the merchant whenever their bank account has an error. Check screenshot:Testing instructions
stripe payouts create --stripe-account="acct_123" --amount="123" --currency="USD"
Settings > Payments > Deposits
, you will see an error notice similar to the one in the screenshotNotes
Payments > Overview > Deposits
via Added notice to inform merchant that their bank account has an error #8321 , and Deposits list screen via Adds notice that deposits are paused to Deposits Listing screen #8347npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge