mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Merge pull request #2895 from woocommerce/PCP-3919-save-changes-is-grey-and-unclickable-when-switching-from-sandbox-to-live
“Save changes” is grey and unclickable when switching from Sandbox to Live
This commit is contained in:
commit
6115ffb457
1 changed files with 4 additions and 0 deletions
|
@ -345,6 +345,10 @@ window.ppcp_onboarding_productionCallback = function ( ...args ) {
|
|||
|
||||
const sandboxSwitchElement = document.querySelector( '#ppcp-sandbox_on' );
|
||||
|
||||
sandboxSwitchElement?.addEventListener( 'click', () => {
|
||||
document.querySelector( '.woocommerce-save-button' )?.removeAttribute( 'disabled' );
|
||||
});
|
||||
|
||||
const validate = () => {
|
||||
const selectors = sandboxSwitchElement.checked
|
||||
? sandboxCredentialElementsSelectors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue