I have found method
$order->get_shipping_method()
to access the name, but i want to retrieve the id instead of name?
I have found method
$order->get_shipping_method()
to access the name, but i want to retrieve the id instead of name?
You must be logged in to post a comment.
thought i’d share how I solved this if someone runs into the same problem as me. I have WC_Order in the $order variable.
This gives me an array with name, type, method_id, cost and taxes.