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 My own made column

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.

  • 1
    It appears to be order meta data, the link you posted shows how to get order meta data. You may have better luck asking the people who wrote the plugin, 3rd party plugins are off-topic here, particularly ones you have to pay for. Presumably you also paid for support when you gave them your money. – Milo Dec 21 '17 at 16:38
  • Alright sorry, I didn't know! I'll try to contact the creator of the plugin! – Arne De Belser Dec 21 '17 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.