• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / EDD_Stats::payments_where() – Modifies the WHERE flag for payment queries

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

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 26th November 2019

Primary Sidebar

Information

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

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 5.9.3
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  edd.wp-a2z.org
© Copyright Easy Digital Downloads a2z 2014-2022. All rights reserved.


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

  • Home
  • Blog
  • Sitemap
  • Sites