• Resolved doudou8

    (@doudou8)


    Hi,
    I am creating an app for my website and I am using Woocommerce API to do it. In the JSON, I have the value for the local_pickup_time_select in meta_data, but I can’t figure out how to get the pickup time from the value. My value is “1550848800”. How do I get the pickup time?

    Please help me.
    Thank you.

    The page I need help with: [log in to see the link]

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

    (@tnolte)

    @doudou8 the value that is currently being stored is a Unix timestamp. In JavaScript you’ll want to instantiate a Date object using something like:

    var date = new Date( local_pickup_time_select * 1000 );

    At that point you can output a user locale Date/Time with:

    date.toLocaleString()

    Thread Starter doudou8

    (@doudou8)

    Thank you so much!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get pickup time from meta_data’ is closed to new replies.