mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
display both WC and own messages
This commit is contained in:
parent
a256cc6d53
commit
223aa6493d
1 changed files with 3 additions and 1 deletions
|
@ -39,7 +39,9 @@ class CheckoutActionHandler {
|
|||
}).then(function (data) {
|
||||
if (!data.success) {
|
||||
spinner.unblock();
|
||||
errorHandler.message(data.data.message, true);
|
||||
//handle both messages sent from Woocommerce (data.messages) and this plugin (data.data.message)
|
||||
const message = typeof(data.messages) !== 'undefined' ? data.messages : data.data.message;
|
||||
errorHandler.message(message, true);
|
||||
return;
|
||||
}
|
||||
const input = document.createElement('input');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue