mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Merge pull request #3524 from woocommerce/PCP-4484-apple-pay-does-not-reflect-updated-shipping-method-or-address-changes-on-checkout
Apple Pay does not update shipping method or address changes on Classic Checkout (4484)
This commit is contained in:
commit
0b6046ad73
1 changed files with 11 additions and 1 deletions
|
@ -334,12 +334,22 @@ class ApplePayButton extends PaymentButton {
|
|||
this.checkEligibility();
|
||||
}
|
||||
|
||||
reinit() {
|
||||
async reinit() {
|
||||
// Missing (invalid) configuration indicates, that the first `init()` call did not happen yet.
|
||||
if ( ! this.validateConfiguration( true ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensures transaction info is updated when cart or checkout update events are triggered.
|
||||
await this.contextHandler
|
||||
.transactionInfo()
|
||||
.then( ( transactionInfo ) => {
|
||||
this.transactionInfo = transactionInfo;
|
||||
} )
|
||||
.catch( ( error ) => {
|
||||
console.error( 'Failed to get transaction info:', error );
|
||||
} );
|
||||
|
||||
super.reinit();
|
||||
|
||||
this.init();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue