From 47d69332882cfc173f07676c4275e991ce96178c Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 25 Apr 2023 16:12:50 +0300 Subject: [PATCH] Replace no final review alert with description --- modules/ppcp-blocks/extensions.php | 7 ++++++- .../ppcp-wc-gateway/resources/js/gateway-settings.js | 12 ------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/modules/ppcp-blocks/extensions.php b/modules/ppcp-blocks/extensions.php index df6b90ec2..758e8ecb1 100644 --- a/modules/ppcp-blocks/extensions.php +++ b/modules/ppcp-blocks/extensions.php @@ -44,7 +44,12 @@ return array( 'blocks_final_review_enabled' => array( 'title' => __( 'Block Express payments Final Review', 'woocommerce-paypal-payments' ), 'type' => 'checkbox', - 'label' => __( 'Require customers to confirm Block Express payments on the Checkout page. If disabled, the Checkout page is skipped for Block Express payments.', 'woocommerce-paypal-payments' ), + 'label' => __( + 'Require customers to confirm Block Express payments on the Checkout page. +If disabled, the Checkout page is skipped for Block Express payments. +

This can cause issues and poor UX if the server is not handling the requests fast enough.

', + 'woocommerce-paypal-payments' + ), 'default' => true, 'screens' => array( State::STATE_START, State::STATE_ONBOARDED ), 'requirements' => array(), diff --git a/modules/ppcp-wc-gateway/resources/js/gateway-settings.js b/modules/ppcp-wc-gateway/resources/js/gateway-settings.js index 910e21395..01ac034c8 100644 --- a/modules/ppcp-wc-gateway/resources/js/gateway-settings.js +++ b/modules/ppcp-wc-gateway/resources/js/gateway-settings.js @@ -19,18 +19,6 @@ import {setVisibleByClass, isVisible} from "../../../ppcp-button/resources/js/mo const form = jQuery('#mainform'); - // TODO: maybe move to a separate JS file in blocks module, when we need more JS for block settings - const finalReviewCheckbox = document.querySelector('#ppcp-blocks_final_review_enabled'); - if (finalReviewCheckbox) { - finalReviewCheckbox.addEventListener('click', () => { - if (!finalReviewCheckbox.checked) { - if (!window.confirm('Are you sure you want to disable the final review on the Checkout page for Block Express payments?')) { - finalReviewCheckbox.checked = true; - } - } - }); - } - const payLaterButtonInput = document.querySelector('#ppcp-pay_later_button_enabled'); if (payLaterButtonInput) {