You appear to be a bot. Output may be restricted
Description
Modifies the WHERE flag for payment queries
Usage
$string = EDD_Stats::payments_where( $where );
Parameters
- $where
- ( mixed ) optional –
Returns
string
Source
File name: easy-digital-downloads/includes/class-edd-stats.php
Lines:
1 to 36 of 36
public function payments_where( $where = '' ) { global $wpdb; $start_where = ''; $end_where = ''; if( ! is_wp_error( $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 $wpdb->posts.post_date >= '{$start_date}'"; } if( ! is_wp_error( $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 $wpdb->posts.post_date <= '{$end_date}'"; } $where .= "{$start_where}{$end_where}"; return $where; }