how I get the woocommerce shipping method name after the customer apply the shipping method in the cart using the country, state and zip code?
I want to display the estimating delivery date by the shipping method that's why I want the shipping method name in the cart after customers apply the shipping method.
You can write some jQuery to hook into the trigger event in cart.js
$( document.body ).trigger( 'update_checkout' );
Use the code below and insert the jQuery you need to output the estimated delivery date where you'd like it positioned. You'll need to check the name of your shipping method also I've just provided an example.
$( document.body ).on( 'update_checkout', function(){
// check code is firing
console.log('update_checkout function fired');
});
When you enqueue your custom script it needs the dependency of wc-cart
and jQuery so make sure you add these to the wp_enqueue_script
function.