woocommerce_shipping_method_chosen
Fires when a shipping method is chosen.
Usage
add_action( 'woocommerce_shipping_method_chosen', 'wp_kama_woocommerce_shipping_method_chosen_action' ); /** * Function for `woocommerce_shipping_method_chosen` action-hook. * * @param string $chosen_method Chosen shipping method. e.g. flat_rate:1. * * @return void */ function wp_kama_woocommerce_shipping_method_chosen_action( $chosen_method ){ // action... }
- $chosen_method(string)
- Chosen shipping method. e.g. flat_rate:1.
Changelog
Since 3.2.0 | Introduced. |
Where the hook is called
woocommerce_shipping_method_chosen
woocommerce/includes/wc-cart-functions.php 480
do_action( 'woocommerce_shipping_method_chosen', $chosen_method );