Add GooglePay checks

This commit is contained in:
Pedro Silva 2023-08-24 18:02:59 +01:00
parent e07f43e982
commit eff390f564
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
2 changed files with 6 additions and 1 deletions

View file

@ -24,6 +24,11 @@ import GooglepayManager from "./GooglepayManager";
return;
}
// If button wrapper is not present then there is no need to load the scripts.
if (!jQuery(buttonConfig.button.wrapper).length) {
return;
}
let bootstrapped = false;
let paypalLoaded = false;
let googlePayLoaded = false;

View file

@ -208,7 +208,7 @@ class GooglepayButton implements ButtonInterface {
* Whether any of the scripts should be loaded.
*/
public function should_load_script(): bool {
return true;
return true; // TODO.
}
/**