<?php
/**
* Template Name: Track VCS
*/
get_header();
?>
<div id="Content">
	<div class="content_wrapper clearfix">

		<div class="sections_group">

			<div class="entry-content" itemprop="mainContentOfPage">

				<div class="section the_content has_content"><div class="section_wrapper"><div class="the_content_wrapper">
					<?php
while ( have_posts() ) {
?><h2>Track Result</h2><div style="text-align: center;"><?php

$order_id = $_GET["cn"];
if (isset($order_id)){
	//	$order_id = 22761;

	if(get_post_type($order_id ) == "shop_order")
	{
	$order = new WC_Order( $order_id );

	echo "Status for Order #".$order_id." is: <strong>".$order->get_status()."</strong>";
	}
	else
	{
	echo "Order Number not found";
	}
}else
	echo "Order Number not found..";
	
?></div><br /><hr><br /><?php

    the_post();

    $mfn_builder = new Mfn_Builder_Front( get_the_ID() );
    $mfn_builder->show();
	
}

?>
					
</div></div></div>
				<div class="section section-page-footer">
					<div class="section_wrapper clearfix">

						<div class="column one page-pager">
													</div>

					</div>
				</div>

			</div>

			
		</div>

		
	</div>
</div>
<?php get_footer();