Get chosen shipping method label
-
I need to get a chosen in cart shipping method’s label, I mean, how it’s displayed in cart page when choosing shipping method.
I’ve got it’s slugname and id, but I can’t get it’s label in fact (or maybe there is some other way of getting the shipping method label).
print WC()->session->get( 'chosen_shipping_methods' )[0]; //returns "table_rate_shipping_moscow" print WC()->session->get( 'shipping_method_counts' )[0]; //returns "56"Finally I should get a string Москва (which equals to table_rate_shipping_moscow in this particular case) .
Thx in advance.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Get chosen shipping method label’ is closed to new replies.