Easy Digital Downloads - Version 2.7.10

Version Description

Download this release

Release Info

Developer cklosows
Plugin Icon 128x128 Easy Digital Downloads
Version 2.7.10
Comparing to
See all releases

Code changes from version 2.7.9 to 2.7.10

easy-digital-downloads.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The easiest way to sell digital products with WordPress.
6
  * Author: Easy Digital Downloads
7
  * Author URI: https://easydigitaldownloads.com
8
- * Version: 2.7.9
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
@@ -25,7 +25,7 @@
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
- * @version 2.7.9
29
  */
30
 
31
  // Exit if accessed directly.
@@ -206,7 +206,7 @@ final class Easy_Digital_Downloads {
206
 
207
  // Plugin version.
208
  if ( ! defined( 'EDD_VERSION' ) ) {
209
- define( 'EDD_VERSION', '2.7.9' );
210
  }
211
 
212
  // Plugin Folder Path.
5
  * Description: The easiest way to sell digital products with WordPress.
6
  * Author: Easy Digital Downloads
7
  * Author URI: https://easydigitaldownloads.com
8
+ * Version: 2.7.10
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
+ * @version 2.7.10
29
  */
30
 
31
  // Exit if accessed directly.
206
 
207
  // Plugin version.
208
  if ( ! defined( 'EDD_VERSION' ) ) {
209
+ define( 'EDD_VERSION', '2.7.10' );
210
  }
211
 
212
  // Plugin Folder Path.
includes/admin/reporting/graphing.php CHANGED
@@ -888,6 +888,7 @@ function edd_get_report_dates() {
888
  $dates['m_end'] = 12;
889
  }
890
 
 
891
  $dates['day_end'] = cal_days_in_month( CAL_GREGORIAN, $dates['m_end'], $dates['year'] );
892
  break;
893
 
@@ -912,11 +913,13 @@ function edd_get_report_dates() {
912
  $dates['year'] = date( 'Y', $current_time );
913
  }
914
 
 
915
  $dates['day_end'] = cal_days_in_month( CAL_GREGORIAN, $dates['m_end'], $dates['year'] );
916
  $dates['year_end'] = $dates['year'];
917
  break;
918
 
919
  case 'this_year' :
 
920
  $dates['m_start'] = 1;
921
  $dates['m_end'] = 12;
922
  $dates['year'] = date( 'Y', $current_time );
@@ -924,6 +927,7 @@ function edd_get_report_dates() {
924
  break;
925
 
926
  case 'last_year' :
 
927
  $dates['m_start'] = 1;
928
  $dates['m_end'] = 12;
929
  $dates['year'] = date( 'Y', $current_time ) - 1;
888
  $dates['m_end'] = 12;
889
  }
890
 
891
+ $dates['day'] = 1;
892
  $dates['day_end'] = cal_days_in_month( CAL_GREGORIAN, $dates['m_end'], $dates['year'] );
893
  break;
894
 
913
  $dates['year'] = date( 'Y', $current_time );
914
  }
915
 
916
+ $dates['day'] = 1;
917
  $dates['day_end'] = cal_days_in_month( CAL_GREGORIAN, $dates['m_end'], $dates['year'] );
918
  $dates['year_end'] = $dates['year'];
919
  break;
920
 
921
  case 'this_year' :
922
+ $dates['day'] = 1;
923
  $dates['m_start'] = 1;
924
  $dates['m_end'] = 12;
925
  $dates['year'] = date( 'Y', $current_time );
927
  break;
928
 
929
  case 'last_year' :
930
+ $dates['day'] = 1;
931
  $dates['m_start'] = 1;
932
  $dates['m_end'] = 12;
933
  $dates['year'] = date( 'Y', $current_time ) - 1;
includes/class-edd-cli.php CHANGED
@@ -653,6 +653,24 @@ class EDD_CLI extends WP_CLI_Command {
653
 
654
  }
655
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
656
  $purchase_data = array(
657
  'price' => edd_sanitize_amount( $total ),
658
  'tax' => 0,
@@ -662,9 +680,13 @@ class EDD_CLI extends WP_CLI_Command {
662
  'currency' => edd_get_currency(),
663
  'downloads' => $final_downloads,
664
  'cart_details' => $cart_details,
665
- 'status' => 'pending'
666
  );
667
 
 
 
 
 
668
  $payment_id = edd_insert_payment( $purchase_data );
669
 
670
  remove_action( 'edd_complete_purchase', 'edd_trigger_purchase_receipt', 999 );
@@ -673,27 +695,8 @@ class EDD_CLI extends WP_CLI_Command {
673
  edd_update_payment_status( $payment_id, $status );
674
  }
675
 
676
- if ( 'random' === $date ) {
677
- // Randomly grab a date from the current past 30 days
678
- $oldest_time = strtotime( '-' . $range . ' days', current_time( 'timestamp') );
679
- $newest_time = current_time( 'timestamp' );
680
-
681
- $timestamp = rand( $oldest_time, $newest_time );
682
- $timestring = date( "Y-m-d H:i:s", $timestamp );
683
- } elseif ( empty( $date ) ) {
684
- $timestring = false;
685
- } else {
686
- if ( is_numeric( $date ) ) {
687
- $timestring = date( "Y-m-d H:i:s", $date );
688
- } else {
689
- $parsed_time = strtotime( $date );
690
- $timestring = date( "Y-m-d H:i:s", $parsed_time );
691
- }
692
- }
693
-
694
  if ( ! empty( $timestring ) ) {
695
  $payment = new EDD_Payment( $payment_id );
696
- $payment->date = $timestring;
697
  $payment->completed_date = $timestring;
698
  $payment->save();
699
  }
653
 
654
  }
655
 
656
+ if ( 'random' === $date ) {
657
+ // Randomly grab a date from the current past 30 days
658
+ $oldest_time = strtotime( '-' . $range . ' days', current_time( 'timestamp') );
659
+ $newest_time = current_time( 'timestamp' );
660
+
661
+ $timestamp = rand( $oldest_time, $newest_time );
662
+ $timestring = date( "Y-m-d H:i:s", $timestamp );
663
+ } elseif ( empty( $date ) ) {
664
+ $timestring = false;
665
+ } else {
666
+ if ( is_numeric( $date ) ) {
667
+ $timestring = date( "Y-m-d H:i:s", $date );
668
+ } else {
669
+ $parsed_time = strtotime( $date );
670
+ $timestring = date( "Y-m-d H:i:s", $parsed_time );
671
+ }
672
+ }
673
+
674
  $purchase_data = array(
675
  'price' => edd_sanitize_amount( $total ),
676
  'tax' => 0,
680
  'currency' => edd_get_currency(),
681
  'downloads' => $final_downloads,
682
  'cart_details' => $cart_details,
683
+ 'status' => 'pending',
684
  );
685
 
686
+ if ( ! empty( $timestring ) ) {
687
+ $purchase_data['post_date'] = $timestring;
688
+ }
689
+
690
  $payment_id = edd_insert_payment( $purchase_data );
691
 
692
  remove_action( 'edd_complete_purchase', 'edd_trigger_purchase_receipt', 999 );
695
  edd_update_payment_status( $payment_id, $status );
696
  }
697
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
698
  if ( ! empty( $timestring ) ) {
699
  $payment = new EDD_Payment( $payment_id );
 
700
  $payment->completed_date = $timestring;
701
  $payment->save();
702
  }
includes/plugin-compatibility.php CHANGED
@@ -157,7 +157,7 @@ function edd_disable_404_redirected_redirect() {
157
  add_action( 'template_redirect', 'edd_disable_404_redirected_redirect', 9 );
158
 
159
  /**
160
- * Addes 'edd' to the list of Say What aliases after moving to WordPress.org language packs
161
  *
162
  * @since 2.4.6
163
  * @param array $aliases Say What domain aliases
@@ -169,3 +169,21 @@ function edd_say_what_domain_aliases( $aliases ) {
169
  return $aliases;
170
  }
171
  add_filter( 'say_what_domain_aliases', 'edd_say_what_domain_aliases', 10, 1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  add_action( 'template_redirect', 'edd_disable_404_redirected_redirect', 9 );
158
 
159
  /**
160
+ * Adds 'edd' to the list of Say What aliases after moving to WordPress.org language packs
161
  *
162
  * @since 2.4.6
163
  * @param array $aliases Say What domain aliases
169
  return $aliases;
170
  }
171
  add_filter( 'say_what_domain_aliases', 'edd_say_what_domain_aliases', 10, 1 );
172
+
173
+ /**
174
+ * Removes the Really Simple SSL mixed content filter during file downloads to avoid
175
+ * errors with chunked file delivery
176
+ *
177
+ * @see https://github.com/rlankhorst/really-simple-ssl/issues/30
178
+ * @see https://github.com/easydigitaldownloads/easy-digital-downloads/issues/5802
179
+ *
180
+ * @since 2.7.10
181
+ * @return void
182
+ */
183
+ function edd_rsssl_remove_mixed_content_filter() {
184
+ if ( class_exists( 'REALLY_SIMPLE_SSL' ) && did_action( 'edd_process_verified_download' ) ) {
185
+ remove_action( 'init', array( RSSSL()->rsssl_mixed_content_fixer, 'start_buffer' ) );
186
+ remove_action( 'shutdown', array( RSSSL()->rsssl_mixed_content_fixer, 'end_buffer' ) );
187
+ }
188
+ }
189
+ add_action( 'plugins_loaded', 'edd_rsssl_remove_mixed_content_filter', 999 );
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://easydigitaldownloads.com/donate/
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce, ecommerce, ebook
7
  Requires at least: 4.0
8
  Tested up to: 4.8
9
- Stable Tag: 2.7.9
10
  License: GNU Version 2 or Any Later Version
11
 
12
  The easiest way to sell digital products with WordPress.
@@ -213,6 +213,11 @@ Yes. Easy Digital Downloads also includes default support for Amazon Payments an
213
 
214
  == Changelog ==
215
 
 
 
 
 
 
216
  = 2.7.9, May 11, 2017 =
217
 
218
  * Fix: Chosen search had incorrect select element targeting.
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce, ecommerce, ebook
7
  Requires at least: 4.0
8
  Tested up to: 4.8
9
+ Stable Tag: 2.7.10
10
  License: GNU Version 2 or Any Later Version
11
 
12
  The easiest way to sell digital products with WordPress.
213
 
214
  == Changelog ==
215
 
216
+ = 2.7.10, June 12, 2017 =
217
+
218
+ * Fix: Plugin Compatibility: Improve file download reliability when Really Simple SSL Mixed Content Filter is active.
219
+ * Fix: Start date not set properly in reports all pre-set ranges.
220
+
221
  = 2.7.9, May 11, 2017 =
222
 
223
  * Fix: Chosen search had incorrect select element targeting.