<?php  
namespace WCQT\classes\frontend;

class OrderListPage
{
	public function __construct()
	{
		add_filter('woocommerce_order_query_args', array($this, 'woocommerce_order_query_args'), 10, 2);
	}

	function woocommerce_order_query_args($vars)
	{
		if(!is_account_page())
			return $vars;
		
		global $wcqt_order_model;
		$quote_statuses = $wcqt_order_model->get_quote_statuses();
		foreach($vars['status'] as $key => $value)
		{
			if(isset($quote_statuses["wc-".$value]) || isset($quote_statuses[$value]))
			{
				unset($vars['status'][$key]);
			}
		}
		
		return $vars;
	}
}
?>