mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
🥅 Catch several JS/API related preview issues
This commit is contained in:
parent
5307225ef3
commit
0197896500
4 changed files with 61 additions and 5 deletions
|
@ -42,7 +42,14 @@ class GooglePayPreviewButtonManager extends PreviewButtonManager {
|
|||
return {};
|
||||
}
|
||||
|
||||
return await apiMethod();
|
||||
try {
|
||||
return await apiMethod();
|
||||
} catch (error) {
|
||||
if (error.message.includes('Not Eligible')) {
|
||||
this.apiError = 'Not Eligible';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue