ID, 'order_data', true) ); if (!isset($data['billing_first_name'])) $data['billing_first_name'] = ''; if (!isset($data['billing_last_name'])) $data['billing_last_name'] = ''; if (!isset($data['billing_company'])) $data['billing_company'] = ''; if (!isset($data['billing_address_1'])) $data['billing_address_1'] = ''; if (!isset($data['billing_address_2'])) $data['billing_address_2'] = ''; if (!isset($data['billing_city'])) $data['billing_city'] = ''; if (!isset($data['billing_postcode'])) $data['billing_postcode'] = ''; if (!isset($data['billing_country'])) $data['billing_country'] = ''; if (!isset($data['billing_state'])) $data['billing_state'] = ''; if (!isset($data['billing_email'])) $data['billing_email'] = ''; if (!isset($data['billing_phone'])) $data['billing_phone'] = ''; if (!isset($data['shipping_first_name'])) $data['shipping_first_name'] = ''; if (!isset($data['shipping_last_name'])) $data['shipping_last_name'] = ''; if (!isset($data['shipping_company'])) $data['shipping_company'] = ''; if (!isset($data['shipping_address_1'])) $data['shipping_address_1'] = ''; if (!isset($data['shipping_address_2'])) $data['shipping_address_2'] = ''; if (!isset($data['shipping_city'])) $data['shipping_city'] = ''; if (!isset($data['shipping_postcode'])) $data['shipping_postcode'] = ''; if (!isset($data['shipping_country'])) $data['shipping_country'] = ''; if (!isset($data['shipping_state'])) $data['shipping_state'] = ''; $data['customer_user'] = (int) get_post_meta($post->ID, 'customer_user', true); $order_status = wp_get_post_terms($post->ID, 'shop_order_status'); if ($order_status) : $order_status = current($order_status); $data['order_status'] = $order_status->slug; else : $data['order_status'] = 'pending'; endif; if (!isset($post->post_title) || empty($post->post_title)) : $order_title = 'Order'; else : $order_title = $post->post_title; endif; ?>