Get only todays orders on order history page
Only display todays orders in WPPizza -> Orderhistory
if you only ever want to get todays orders on admin order history page, something like this might work for you
wppizza_filter_orders_query
@param: str (the query string)
@return: str
example:
add_filter('wppizza_filter_orders_query', 'myprefix_admin_orderhistory_query_filter'); function myprefix_admin_orderhistory_query_filter($query){ $today = date('Y-m-d',current_time('timestamp')); $today_start = $today.' 00:00:00'; $today_end = $today.' 23:59:59'; /* edit/alter the query where clause */ $query = str_ireplace('WHERE', 'WHERE order_date>="'.$today_start.'" AND order_date<="'.$today_end.'" AND ', $query); return $query; }