mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Fix ApplePay and GooglePay on block pages
This commit is contained in:
parent
cb753cf47c
commit
976e8b90ca
4 changed files with 7 additions and 3 deletions
|
@ -25,7 +25,7 @@ class ApplepayButton {
|
|||
|
||||
this.updated_contact_info = []
|
||||
this.selectedShippingMethod = []
|
||||
this.nonce = document.getElementById('woocommerce-process-checkout-nonce')?.value
|
||||
this.nonce = document.getElementById('woocommerce-process-checkout-nonce')?.value || buttonConfig.nonce
|
||||
|
||||
this.log = function() {
|
||||
if ( this.buttonConfig.is_debug ) {
|
||||
|
|
|
@ -89,7 +89,8 @@ class ApplepayModule implements ModuleInterface {
|
|||
$module->render_buttons( $c, $apple_payment_method );
|
||||
|
||||
$apple_payment_method->bootstrap_ajax_request();
|
||||
}
|
||||
},
|
||||
1
|
||||
);
|
||||
|
||||
add_filter(
|
||||
|
|
|
@ -148,6 +148,7 @@ class DataToAppleButtonScripts {
|
|||
'totalLabel' => $total_label,
|
||||
),
|
||||
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
||||
'nonce' => wp_create_nonce( 'woocommerce-process_checkout' ),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -195,6 +196,7 @@ class DataToAppleButtonScripts {
|
|||
'totalLabel' => $total_label,
|
||||
),
|
||||
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
||||
'nonce' => wp_create_nonce( 'woocommerce-process_checkout' ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,7 +155,8 @@ class GooglepayModule implements ModuleInterface {
|
|||
}
|
||||
);
|
||||
|
||||
}
|
||||
},
|
||||
1
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue