Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rajeshsingh520/1258b1ff54939cbb7bf89ebb13d20190 to your computer and use it in GitHub Desktop.

Select an option

Save rajeshsingh520/1258b1ff54939cbb7bf89ebb13d20190 to your computer and use it in GitHub Desktop.
<?php
/*
say $order_id has the order or then you can get the detail using the below code
if you have WC_order object in say $order varaible you can get order id like this
$order_id = $order->get_id()
*/
$type = get_post_meta( $order_id, 'pi_delivery_type', true ); // delivery type 'delivery' or 'pickup'
$date = get_post_meta( $order_id, 'pi_system_delivery_date', true ); // date in yyyy/mm/dd format
$time = get_post_meta( $order_id, 'pi_delivery_time', true ); // delivery time
$location = get_post_meta( $order_id, 'pickup_location', true ); // pickup location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment