`if($_GET['key'])
{
//echo $order->get_order_number();
//set_query_var('numberorder', $order->get_order_number());
//exit;
$_SESSION['numberorder'] = $order->get_order_number();
wp_redirect(home_url('thankyou'));
exit;
}
?>`
`
<?php echo $_SESSION['numberorder']; ?>