我正在使用updated_cart_totalsjQuery 事件来监听 WooCommerce 购物车更新。每当我更新购物车时它都会起作用,但我也需要获取新的购物车总数。
这是我监听“updated_cart_totals”事件的基本代码:
$(document.body).on('updated_cart_totals', function (event) {
alert("in here");
});
Run Code Online (Sandbox Code Playgroud)