Home / APIs / EDD_Stats::count_where() – Modifies the WHERE flag for payment counts

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;
  }
 

 View on GitHub View on Trac

Published: 14th March 2017 | Last updated: 14th March 2017

Information

Function name: EDD_Stats::count_where
Class ref: EDD_Stats
Plugin ref: Easy Digital Downloads
Version: 2.9.11
Sourcefile: includes/class-edd-stats.php
File ref: includes/class-edd-stats.php
Deprecated?: No
API Letters: C,E,S,W

  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Files
  • Hooks
  • Classes
  • Sites
  • Sitemap
  • Blog
oik-plugins Easy Digital Downloads a2z
Easy Digital Downloads a2z

Site:  edd.wp-a2z.org
© Copyright oik-plugins 2014-2019. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins