I'm trying to add a custom column to my wooCommerce orders page with a date from a plugin. I have a plugin that enables users to choose their own date to pickup an order on the checkout page.
This is the plugin: https://www.simbahosting.co.uk/s3/product/woocommerce-opening-hours-delivery-times/
And I was following this guide to help me: https://www.skyverge.com/blog/add-woocommerce-orders-list-column/
Now I was able to add a custom column (guess that was the easy step).
Screeny below
On the second step of the tutorial I got stuck. :(
They print out the profit, but I want to do the following: I want to show the date the user picked from the Opening Hours plugin.
Now I went looking in the opening-hours.php code and found the following code
public function woocommerce_admin_order_data_after_shipping_address($order) {
if ($time = $this->wc_compat->get_meta($order, '_openinghours_time', true)) {
$time = $this->get_display_time_from_meta($time);
echo '<p id="openinghours_admin_timechosen"><strong>'.$this->get_time_chosen_label('label').":</strong> $time</p>";
}
}
So I guess in the variable $time here is the date I need, but I don't see how I can forward this information into my functions.php file to display it in the column.
If you have any idea how I could get this to work, feel free to let me know.