mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Pass the error message from the api up to the button's error handler
Remove the "Error:" prefix front he front-end facing error message The notice has already the error state and it's implied
This commit is contained in:
parent
74a4846861
commit
cfe450f835
6 changed files with 11 additions and 16 deletions
|
@ -15,7 +15,7 @@ class ErrorHandler {
|
|||
{
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.innerHTML = text;
|
||||
return textarea.value;
|
||||
return textarea.value.replace('Error: ', '');
|
||||
}
|
||||
|
||||
clear()
|
||||
|
@ -28,4 +28,4 @@ class ErrorHandler {
|
|||
}
|
||||
}
|
||||
|
||||
export default ErrorHandler;
|
||||
export default ErrorHandler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue