We’ve recently updated a customer Magento2 to 2.4.5-p5, now the cart page added a confirmation popup when clicking the empty cart button:
Magento_Checkout/js/shopping-cart.js
_confirmClearCart: function () {
var self = this;
confirm({
content: $.mage.__('Are you sure you want to remove all items from your shopping cart?'),
actions: {
/**
* Confirmation modal handler to execute clear cart action
*/
confirm: function () {
self.clearCart();
}
}
});
},
We’d like to remove the confirmation popup so the button empties the cart straight away, any idea on the fastest and simplest approach to doing this?