redirect after successfully cleared DB

This commit is contained in:
Narek Zakarian 2022-12-09 16:51:29 +04:00
parent 6a9c76fa9e
commit 9eb14e192a
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7
2 changed files with 2 additions and 0 deletions

View file

@ -36,6 +36,7 @@ document.addEventListener(
jQuery(clearDbConfig.successMessage).insertAfter(clearButton);
setTimeout(()=> jQuery(clearDbConfig.messageSelector).remove(),3000);
clearButton.removeAttribute('disabled');
window.location.replace(clearDbConfig.redirectUrl);
});
})
},

View file

@ -64,6 +64,7 @@ return array(
'<div class="error clear-db-info-message"><p><strong>%1$s</strong></p></div>',
esc_html__( 'Operation failed. Check WooCommerce logs for more details.', 'woocommerce-paypal-payments' )
),
'redirectUrl' => admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway' ),
),
);
},