This topic is: not resolved
Viewing 5 posts - 1 through 5 (of 5 total)
Hi,
Not sure if my last message went through, computer playing up.
My client needs the ability to print a report based on location bookings, is this a possibility?
Thanks
Hi!
There is no built-in report in the theme, but you can get the names of the locations of the ordered items in a specific order by the following request.
$order = wc_get_order( 2117 ); // 2117 - order ID foreach ( $order->get_items() as $item_id => $item ) { $pick_up = wc_get_order_item_meta( $item_id, 'pick_up', true ); $drop_off = wc_get_order_item_meta( $item_id, 'drop_off', true ); }
The metadata is stored in the wp_woocommerce_order_itemmeta table. I think this information will help you to create your report.
thanks, do I add that code in the child theme’s functions.php file? Not sure where to add.
If you can explain how I add step by step I can do.
This is just a hint where to get the data from. You need a programmer to create a custom report script.