shortcode_wrapper('woocommerce_order_tracking', $atts); } function woocommerce_order_tracking( $atts ) { global $woocommerce; extract(shortcode_atts(array( ), $atts)); global $post; if ($_POST) : $order = &new woocommerce_order(); if (isset($_POST['orderid']) && $_POST['orderid'] > 0) $order->id = (int) $_POST['orderid']; else $order->id = 0; if (isset($_POST['order_email']) && $_POST['order_email']) $order_email = trim($_POST['order_email']); else $order_email = ''; if ( !$woocommerce->verify_nonce('order_tracking') ): echo '

'.__('You have taken too long. Please refresh the page and retry.', 'woothemes').'

'; elseif ($order->id && $order_email && $order->get_order( $order->id )) : if ($order->billing_email == $order_email) : echo '

'.sprintf( __('Order #%s which was made %s has the status “%s”', 'woothemes'), $order->id, human_time_diff(strtotime($order->order_date), current_time('timestamp')).__(' ago', 'woothemes'), $order->status ); if ($order->status == 'completed') echo __(' and was completed ', 'woothemes').human_time_diff(strtotime($order->completed_date), current_time('timestamp')).__(' ago', 'woothemes'); echo '.

'; ?> get_customer_order_notes(); if ($notes) : ?>

  1. comment_date)); ?>

    comment_content)); ?>

order_shipping>0) : ?>get_total_tax()>0) : ?>order_discount>0) : ?>items as $order_item) : if (isset($order_item['variation_id']) && $order_item['variation_id'] > 0) : $_product = &new woocommerce_product_variation( $order_item['variation_id'] ); else : $_product = &new woocommerce_product( $order_item['id'] ); endif; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; endforeach; ?>
get_subtotal_to_display(); ?>
get_shipping_to_display(); ?>
get_total_tax()); ?>
-order_discount); ?>
order_total); ?>
'.$_product->get_title(); if (isset($_product->variation_data)) : echo woocommerce_get_formatted_variation( $_product->variation_data ); endif; echo ''.$_product->sku.''.woocommerce_price($_product->get_price()).''.$order_item['qty'].'

billing_first_name.' '.$order->billing_last_name.'
'; if ($order->billing_company) $address .= $order->billing_company.'
'; $address .= $order->formatted_billing_address; echo $address; ?>

shipping_first_name.' '.$order->shipping_last_name.'
'; if ($order->shipping_company) $address .= $order->shipping_company.'
'; $address .= $order->formatted_shipping_address; echo $address; ?>

'.__('Sorry, we could not find that order id in our database. Want to retry?', 'woothemes').'

'; endif; else : echo '

'.__('Sorry, we could not find that order id in our database. Want to retry?', 'woothemes').'

'; endif; else : ?>

" />

nonce_field('order_tracking') ?>