removed disabled from button when sandbox is changed

This commit is contained in:
Daniel Hüsken 2024-12-10 12:31:55 +01:00
parent 332a4fd766
commit c65ca2a00b
No known key found for this signature in database
GPG key ID: 9F732DA37FA709E8

View file

@ -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