I have been trying to figure out how to get the shipping class from the order after payment is complete. I have found this…
$shipping_class = $cart_item['data']->get_shipping_class();
but that retrieves the shipping class from an active cart, I need to get this after the order is processed, possibly from…
$order = new wc_get_order(id);
$items = $order->get_items();
I can then get the product and variation ids but for some reason I am not seeing how to get the shipping class from this.
any help on this would be greatly appreciated!