woocommerce_shipping_method_chosen action-hookWC 3.2.0

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

wc_get_chosen_shipping_method_for_package()
woocommerce_shipping_method_chosen
woocommerce/includes/wc-cart-functions.php 480
do_action( 'woocommerce_shipping_method_chosen', $chosen_method );

Where the hook is used in WooCommerce

Usage not found.