From bdde4cefea5d430682d4c51a23dc47aa1a9dcb99 Mon Sep 17 00:00:00 2001 From: Ravinder Kumar Date: Thu, 24 Aug 2023 11:49:36 +0530 Subject: [PATCH] fix: wait for dismiss modal ajax request before exit page --- .../PayPalStandardToDonationsMigrationGlobalBanner.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PaymentGateways/PayPalCommerce/Banners/PayPalStandardToDonationsMigrationGlobalBanner.php b/src/PaymentGateways/PayPalCommerce/Banners/PayPalStandardToDonationsMigrationGlobalBanner.php index 5eaa4633f9..cd0c0d05e1 100644 --- a/src/PaymentGateways/PayPalCommerce/Banners/PayPalStandardToDonationsMigrationGlobalBanner.php +++ b/src/PaymentGateways/PayPalCommerce/Banners/PayPalStandardToDonationsMigrationGlobalBanner.php @@ -130,8 +130,8 @@ classes: { window.open('https://docs.givewp.com/paypal-migration-doc', '_blank') }); - modal.querySelector('.give-popup-confirm-button').addEventListener('click', () => { - dismissModalAjaxRequest(); + modal.querySelector('.give-popup-confirm-button').addEventListener('click', async () => { + await dismissModalAjaxRequest(); window.location.assign('$linkToPayPalDonationsSettingPage'); }); },