Skip to content

Commit fd74a8b

Browse files
authored
[CommerceExtension] Confirmation dialog before performing deletion in 'bad access token' UI (#510)
1 parent 3c6d6a9 commit fd74a8b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/code/Meta/BusinessExtension/view/adminhtml/web/js/commerce_extension.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ require(['jquery'], function (jQuery) {
104104
const resetLink = document.getElementById('commerce-extension-reset-link');
105105
if (resetLink != null) {
106106
resetLink.addEventListener('click', function () {
107+
const confirmationText = "Are you sure you want to delete the connection?\n\n" +
108+
'Your store will no longer be connected to Meta and you will need to reconnect your ' +
109+
'assets to restore the connection.';
110+
if (!confirm(confirmationText)) {
111+
return;
112+
}
113+
107114
deleteFBAssetsAndReloadPage();
108115
return false;
109116
});

0 commit comments

Comments
 (0)