mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
🦺 Add new console error to help us debug issues
This new console error should help us identify cache-related issues faster
This commit is contained in:
parent
cea292684b
commit
bc57fdcd6a
1 changed files with 6 additions and 0 deletions
|
@ -105,6 +105,12 @@ class PreviewButtonManager {
|
|||
return;
|
||||
}
|
||||
|
||||
// This is a localization object of "gateway-settings.js". If it's missing, the script was not loaded.
|
||||
if (!window.PayPalCommerceGatewaySettings) {
|
||||
this.error('PayPal settings are not fully loaded. Please clear the cache and reload the page.');
|
||||
return;
|
||||
}
|
||||
|
||||
// A helper function that clears the interval and resolves/rejects the promise.
|
||||
const resolveOrReject = (resolve, reject, id, success = true) => {
|
||||
clearInterval(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue