Adds nonce validation to refresh feature status request.

This commit is contained in:
Pedro Silva 2023-12-12 18:12:48 +00:00
parent d2abeb5dbf
commit 81f606912f
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
2 changed files with 30 additions and 12 deletions

View file

@ -354,9 +354,8 @@ document.addEventListener(
});
}
(() => {
const props = PayPalCommerceGatewaySettings.ajax.refresh_feature_status;
// Logic to handle the "Check available features" button.
((props) => {
const $btn = jQuery(props.button);
$btn.click(async () => {
@ -388,7 +387,7 @@ document.addEventListener(
}
});
})();
})(PayPalCommerceGatewaySettings.ajax.refresh_feature_status);
}
);