1$rate_table = array();
2
3$shipping_methods = WC()->shipping->get_shipping_methods();
4
5foreach($shipping_methods as $shipping_method){
6 $shipping_method->init();
7
8 foreach($shipping_method->rates as $key=>$val)
9 $rate_table[$key] = $val->label;
10}
11
12echo $rate_table[WC()->session->get( 'chosen_shipping_methods' )[0]];
1$chosen_shipping_method_price = WC()->session->get('cart_totals')['shipping_total'];
1$shipping_classes = get_terms( array('taxonomy' => 'product_shipping_class', 'hide_empty' => false ) );