Error messages for tax / VAT details modal are incorrect for Japan #9144
Labels
focus: tax (VAT) documents
priority: medium
The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability
type: bug
The issue is a confirmed bug.
Describe the bug
The error messages for invalid tax ID mention
VAT
specifically.These error messages need to be localised to different countries with different names for "VAT", in particular, Japan. Spun off from:
Note that WooPayments service now returns symbolic error codes, allowing the messages to be localised on client:
To fix this bug, I suggest we map error code to error message in plugin client. However could also fix by returning different error messages from service.
To Reproduce
JP
Payments > Documents
. Fake one up with this CLI command:wp wcpay add_document_for_account [account_id] vat_invoice --mode=test --period_from="2024-04-01 00:00:00" --period_to="2024-04-30 23:59:59"
wp wcpay backfill_merchant_vat_invoices
company_vat_submitted
company_vat_number
company_name
company_address
fromwcpay_account_meta
table.Payments > Documents
.Download
for a tax doc row.abc124
, and clickContinue
Actual behavior
Error message says bad
VAT number
.Expected behavior
Error message should refer to
corporate number
(as appropriate for country).While we're here, IMO that error message should be closer to the bad data, i.e. above the
Continue
button. @rogermattic is that aligned with design principles for error messages/components?The text was updated successfully, but these errors were encountered: