Answer the question
In order to leave comments, you need to log in
How to get shipping method data?
Good afternoon. You need to get the data of delivery methods on the checkout page (there is no order yet). So far I get this:
WC()->shipping->packages[0]['rates']
But it outputs:
[flat_rate:64] => WC_Shipping_Rate Object
(
[data:protected] => Array
(
[id] => flat_rate:64
[method_id] => flat_rate
[instance_id] => 64
[label] => Москва по городу: Платная доставка при заказе менее 2000р
[cost] => 200
[taxes] => Array
(
)
)
[meta_data:protected] => Array
(
[Позиции] => Товар
)
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question