mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Remove unused
This commit is contained in:
parent
be389d4044
commit
39367e7b51
1 changed files with 0 additions and 27 deletions
|
@ -101,27 +101,6 @@ function ppcp_onboarding_productionCallback(...args) {
|
|||
return ppcp_onboarding.loginSeller('production', ...args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Since the PayPal modal will redirect the user a dirty form
|
||||
* provokes an alert if the user wants to leave the page. Since the user
|
||||
* needs to toggle the sandbox switch, we disable this dirty state with the
|
||||
* following workaround for checkboxes.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
const checkBoxOnClick = (event) => {
|
||||
const value = event.target.checked;
|
||||
if (event.target.getAttribute('id') === 'ppcp-sandbox_on') {
|
||||
toggleSandboxProduction(! value);
|
||||
}
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
setTimeout( () => {
|
||||
event.target.checked = value;
|
||||
},1
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Toggles the credential input fields.
|
||||
*
|
||||
|
@ -274,12 +253,6 @@ const disconnect = (event) => {
|
|||
);
|
||||
}
|
||||
|
||||
// document.querySelectorAll('#mainform input[type="checkbox"]').forEach(
|
||||
// (checkbox) => {
|
||||
// checkbox.addEventListener('click', checkBoxOnClick);
|
||||
// }
|
||||
// );
|
||||
|
||||
document.querySelectorAll('#field-sandbox_toggle_manual_input button, #field-production_toggle_manual_input button').forEach(
|
||||
(button) => {
|
||||
button.addEventListener(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue