• I’m following the rules here……..

    Website URL: https://wm.jfcanada.ca
    PHP Version: 7.2.15
    WordPress Version: 5.1.1
    WooCommerce Version: 3.6.2
    Plugin Version: 1.3.10
    WordPress Timezone Setting: Edmonton
    WordPress Date Format Setting: F j, Y
    WordPress Time Format Setting: g:i a
    All Plugin Start/End Pickup Time Settings: 11:15 AM to 09:45 PM (Sun-Thu) | 11:15 AM to 10:45 PM (Fri-Sat)
    Plugin Pickup Time Interval Setting: 10 minutes
    Plugin Pickup Time Delay Setting: 15 minutes
    Plugin Pickup Time Open Days Ahead Setting: 2

    Okay that took a while.

    I need to extract the pickup time to print on a receipt/invoice and I couldn’t locate where the data is stored. I have two plugins that does the printing:
    Print Google Cloud Print GCP WooCommerce – for receipt printer cloud printing
    WooCommerce PDF Invoices & Packing Slips – for email PDF sending
    None of them seem to include the text field “Local Pickup Time” on the receipt/invoices.

    Plus, when I use the WooCommerce iOS app, in order details, I don’t see it either.

    I tried to inspect the element in Chrome, when viewer the order details, it only shows as plain text without any variables or functions.

    Gotta say, nicely done. There’s just no trace of it lol. Is there a way I can integrate this information to the receipt/invoice? Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tim Nolte

    (@tnolte)

    @cooladai so the pickup time is store as order meta data. You can get the value from the order object like this:

    $the_order->get_meta( '_local_pickup_time_select' );

    And in the Local_Pickup_Time_Admin class there is a method:

    pickup_time_select_translatable()

    That you can use to show a user readable, and translated, version of the value, which is stored as a unix timestamp.

    Now with all of that being said there is another way we could go about this. If you’re plugins were to have some hooks for where you would want to use the local pickup time, I could use those hooks to automatically take care of pushing the local pickup time to your plugins where needed. One advantage this would have is that you can control from your plugins where the value shows up but your code wouldn’t be so tightly coupled with our plugin such that if we were to change it that it would break your plugins. I kind of have it in mind to do some more heavy refactoring to begin using namespaces as well as start breaking up the plugin so that it can be fully unit tested.

    Anyways, you could for now make the calls to the our plugin yourself for now and we could start to collaborate on getting cross support going at some point in the future. I would totally be on board with beginning to support any plugins that could provide hooks so the local pickup time would easily be available to them. Hope this helps.

    Plugin Author Tim Nolte

    (@tnolte)

    @cooladai just following up to see if you need anything else? We just got a request the other day related to the WooCommerce PDF Invoices & Packing Slips plugin and I’m curious how you might be going about injecting the pickup time into that plugin, I didn’t see right off any plugin hooks that it provided that we could tap to inject this via our plugin. Let me know how things are going and if I can be of any more help. Thanks!

    How is this progressing? I’m hoping to pretty much do the same thing for the invoice/delivery note that the plugin WooCommerce Print Invoice & Delivery Note by Tyche Softwares generates. As of right now it’s just grabbing the “instore pickup” from Woo but not the time/date for pickup info that shows up on the orders page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Order Detail Info Extract’ is closed to new replies.