Woocommerce结帐ajax回调

问题描述:

在woocommerce结帐中是否有ajax动作(当您更改运费时)的javascript回调?你如何看待这个回调?Woocommerce结帐ajax回调

+1

是的。运送方式发生变化时运行['updated_shipping_method'](https://github.com/woothemes/woocommerce/blob/master/assets/js/frontend/cart.js#L35)。 – helgatheviking

+2

看起来不错,但似乎这只是在购物车没有在结帐时触发?我无法将任何东西绑定到该触发器。 –

+1

只是深入代码,似乎有一个名为“update_checkout”的触发器......可能他们删除了更新版本的触发器?无论如何。谢谢你,先生;)你让我走上了正确的轨道。 –

jQuery(document).on('updated_checkout', function() { 

    console.log('here goes a action'); 

});