Pulling info to G Sheet
-
Hi,
I have some code to pull in all the order info to a google sheet. Using the following code:-
$order_data[‘billing_first_name’] = ( method_exists( $order, ‘get_billing_first_name’ ) && is_string( $order->get_billing_first_name() ) ? $order->get_billing_first_name() : “” );
$order_data[‘billing_last_name’] = ( method_exists( $order, ‘get_billing_last_name’ ) && is_string( $order->get_billing_last_name() ) ? $order->get_billing_last_name() : “” );
# site Current Time
$order_data[‘site_time’] = ( isset( $this->Time ) ? $this->Time : ” );
$order_data[‘site_date’] = ( isset( $this->Date ) ? $this->Date : ” );
# Start
$order_data[‘shipping_method’] = ( method_exists( $order, ‘get_shipping_method’ ) && is_string( $order->get_shipping_method() ) ? $order->get_shipping_method() : “” );
$order_data[‘total’] = ( method_exists( $order, ‘get_total’ ) && is_string( $order->get_total() ) ? $order->get_total() : “” );
$order_data[‘delivery_date’] = get_post_meta( $order->get_id(), ‘jckwds_date’, true ) . ‘ ‘ . get_post_meta( $order->get_id(), ‘jckwds_timeslot’, true );
$order_data[‘order_number’] = ( method_exists( $order_id, ‘get_order_number’ ) && is_string( $order->get_order_number() ) ? $order->get_order_number() : “” );`However as I am using your plugin, i just can not get it to pull in your order number instead of the orignal post number. Any ideas how I can get this info pulled in?
Thanks in Advance.
J
- The topic ‘Pulling info to G Sheet’ is closed to new replies.