mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Replace no final review alert with description
This commit is contained in:
parent
9d638a57e3
commit
47d6933288
2 changed files with 6 additions and 13 deletions
|
@ -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.
|
||||
<p class="description">This can cause issues and poor UX if the server is not handling the requests fast enough.</p>',
|
||||
'woocommerce-paypal-payments'
|
||||
),
|
||||
'default' => true,
|
||||
'screens' => array( State::STATE_START, State::STATE_ONBOARDED ),
|
||||
'requirements' => array(),
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue