I have been trying to figure out how i get the ressource on a WC-order, from the product line data, but i seem not to be able to figure this out in WC 3.0+ - pre that it was pretty easy.
I have looked at both the booking meta data, the order meta data, and everything else i can think of, but still unable to find what im looking for.
I have 1 Product with the ID 194 and that product have 2 ressources - and im looking to find the resource in the order line.
Code:
$order = new WC_Order((int)$order_id);
$orderLine = array_values($order->get_items())[0];
Plugins:
- Updated WooCommerce
- Updated WooCommerce-Booking