WooCommerce Hook is not firing and seem to be deprecated
16:15 29 Nov 2025

I know it's 2025, and this problem seems to be all over the place, and I've been trying all the recommended solutions, but it seems it's mostly old code. But I don't really know; I'll try to sum it up as clearly as possible. So, I have a third-party shipping provider that asked me to retrieve shipping prices from their API after sending them the origin/destination zip codes and dimensions in a couple of asynchronous-from-each-other HTTP requests. The actual problem I'm facing is that the hook I'm supposed to use (woocommerce_after_checkout_billing_form)is not even working or triggering. I already checked it in a clean installation to prevent theme/plugin conflicts.

I basically need to do something like this:

add_action('woocommerce_after_checkout_billing_form', 'update_shipping');

function update_shipping(){
  myHttpRequest (payload) {
    mySecondHttpRequest (payload); //I guess here I should be using AJAX for those requests instead?
  }
}

secondHttpRequest (payload) {
  // update my UI
}

Problem is, I've tried so many ways to trigger the woocommerce_after_checkout_billing_form, but no success at all. I guess it's deprecated, or maybe I'm calling it wrongly? I'm doing this for a friend's project. I haven't touched code in years, but I should be able to pull this off. I appreciate your time taking a look. (Ahhh, forgot to mention I've been placing this code in functions.php).

php ajax woocommerce hook-woocommerce