WooCommerce:如何在审核订单和支付方法部分Ajax刷新后运行JS代码?

dra*_*035 2 woocommerce

在结帐页面上,我需要动态修改"查看订单"部分的内容.这很棘手,因为它是Ajax加载的.如何在加载或重新加载Ajax之后运行JS代码,同时确保它不会在它之前运行?

hel*_*ing 8

听取updated_checkout触发器.像这样的东西可能会起作用:

$( 'body' ).on( 'updated_checkout', function() {
  console.log( 'checkout was updated' );
});
Run Code Online (Sandbox Code Playgroud)