You appear to be a bot. Output may be restricted
Description
Modifies the WHERE flag for payment counts
Usage
$string = EDD_Stats::count_where( $where );
Parameters
- $where
- ( mixed ) optional –
Returns
string
Source
File name: easy-digital-downloads/includes/class-edd-stats.php
Lines: 1 to 35 of 35
public function count_where( $where = '' ) { // Only get payments in our date range $start_where = ''; $end_where = ''; if( $this->start_date ) { if( $this->timestamp ) { $format = 'Y-m-d H:i:s'; } else { $format = 'Y-m-d 00:00:00'; } $start_date = date( $format, $this->start_date ); $start_where = " AND p.post_date >= '{$start_date}'"; } if( $this->end_date ) { if( $this->timestamp ) { $format = 'Y-m-d H:i:s'; } else { $format = 'Y-m-d 23:59:59'; } $end_date = date( $format, $this->end_date ); $end_where = " AND p.post_date <= '{$end_date}'"; } $where .= "{$start_where}{$end_where}"; return $where; }