🦺 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:
Philipp Stracker 2024-06-12 11:31:16 +02:00
parent cea292684b
commit bc57fdcd6a
No known key found for this signature in database

View file

@ -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);