mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Fix GooglePay preview rendering race condition.
This commit is contained in:
parent
993191ff34
commit
b38658aeeb
2 changed files with 4 additions and 2 deletions
|
@ -83,6 +83,9 @@ import widgetBuilder from "../../../ppcp-button/resources/js/modules/Renderer/Wi
|
|||
|
||||
googlePayConfig = await widgetBuilder.paypal.Googlepay().config();
|
||||
|
||||
// We need to set bootstrapped here otherwise googlePayConfig may not be set.
|
||||
bootstrapped = true;
|
||||
|
||||
let options;
|
||||
while (options = buttonQueue.pop()) {
|
||||
createButton(options.ppcpConfig);
|
||||
|
@ -103,7 +106,6 @@ import widgetBuilder from "../../../ppcp-button/resources/js/modules/Renderer/Wi
|
|||
|
||||
const tryToBoot = () => {
|
||||
if (!bootstrapped && paypalLoaded && googlePayLoaded) {
|
||||
bootstrapped = true;
|
||||
bootstrap();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ document.addEventListener(
|
|||
jQuery( '*[data-ppcp-display]' ).each( (index, el) => {
|
||||
const rules = jQuery(el).data('ppcpDisplay');
|
||||
|
||||
console.log('rules', rules);
|
||||
// console.log('rules', rules);
|
||||
|
||||
for (const rule of rules) {
|
||||
displayManager.addRule(rule);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue