Easy Digital Downloads - Version 2.5.13

Version Description

Download this release

Release Info

Developer mordauk
Plugin Icon 128x128 Easy Digital Downloads
Version 2.5.13
Comparing to
See all releases

Code changes from version 2.5.12 to 2.5.13

easy-digital-downloads.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Serve Digital Downloads Through WordPress.
6
  * Author: Pippin Williamson and Company
7
  * Author URI: https://easydigitaldownloads.com
8
- * Version: 2.5.12
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.5.12
29
  */
30
 
31
  // Exit if accessed directly.
@@ -186,7 +186,7 @@ final class Easy_Digital_Downloads {
186
 
187
  // Plugin version.
188
  if ( ! defined( 'EDD_VERSION' ) ) {
189
- define( 'EDD_VERSION', '2.5.12' );
190
  }
191
 
192
  // Plugin Folder Path.
5
  * Description: Serve Digital Downloads Through WordPress.
6
  * Author: Pippin Williamson and Company
7
  * Author URI: https://easydigitaldownloads.com
8
+ * Version: 2.5.13
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
+ * @version 2.5.13
29
  */
30
 
31
  // Exit if accessed directly.
186
 
187
  // Plugin version.
188
  if ( ! defined( 'EDD_VERSION' ) ) {
189
+ define( 'EDD_VERSION', '2.5.13' );
190
  }
191
 
192
  // Plugin Folder Path.
includes/admin/tracking.php CHANGED
@@ -63,16 +63,26 @@ class EDD_Tracking {
63
  * @return void
64
  */
65
  private function setup_data() {
 
66
 
67
  $data = array();
68
 
69
  // Retrieve current theme info
70
  $theme_data = wp_get_theme();
71
  $theme = $theme_data->Name . ' ' . $theme_data->Version;
72
-
73
- $data['url'] = home_url();
74
- $data['theme'] = $theme;
75
- $data['email'] = get_bloginfo( 'admin_email' );
 
 
 
 
 
 
 
 
 
76
 
77
  // Retrieve current plugin information
78
  if( ! function_exists( 'get_plugins' ) ) {
@@ -92,7 +102,7 @@ class EDD_Tracking {
92
  $data['active_plugins'] = $active_plugins;
93
  $data['inactive_plugins'] = $plugins;
94
  $data['products'] = wp_count_posts( 'download' )->publish;
95
- $data['download_label'] = edd_get_label_singular( true );
96
 
97
  $this->data = $data;
98
  }
63
  * @return void
64
  */
65
  private function setup_data() {
66
+ global $edd_options;
67
 
68
  $data = array();
69
 
70
  // Retrieve current theme info
71
  $theme_data = wp_get_theme();
72
  $theme = $theme_data->Name . ' ' . $theme_data->Version;
73
+
74
+ $data['php_version'] = phpversion();
75
+ $data['edd_version'] = EDD_VERSION;
76
+ $data['wp_version'] = get_bloginfo( 'version' );
77
+ $data['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
78
+
79
+ $checkout_page = ! empty( $edd_options['purchase_page'] ) ? $edd_options['purchase_page'] : false;
80
+ $data['install_date'] = false !== $checkout_page ? get_post_field( 'post_date', $checkout_page ) : 'not set';
81
+
82
+ $data['multisite'] = is_multisite();
83
+ $data['url'] = home_url();
84
+ $data['theme'] = $theme;
85
+ $data['email'] = get_bloginfo( 'admin_email' );
86
 
87
  // Retrieve current plugin information
88
  if( ! function_exists( 'get_plugins' ) ) {
102
  $data['active_plugins'] = $active_plugins;
103
  $data['inactive_plugins'] = $plugins;
104
  $data['products'] = wp_count_posts( 'download' )->publish;
105
+ $data['download_label'] = edd_get_label_singular( true );
106
 
107
  $this->data = $data;
108
  }
includes/payments/class-edd-payment.php CHANGED
@@ -1958,6 +1958,52 @@ final class EDD_Payment {
1958
  $user_info = isset( $this->payment_meta['user_info'] ) ? maybe_unserialize( $this->payment_meta['user_info'] ) : array();
1959
  $user_info = wp_parse_args( $user_info, $defaults );
1960
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1961
  return $user_info;
1962
  }
1963
 
1958
  $user_info = isset( $this->payment_meta['user_info'] ) ? maybe_unserialize( $this->payment_meta['user_info'] ) : array();
1959
  $user_info = wp_parse_args( $user_info, $defaults );
1960
 
1961
+
1962
+ if ( empty( $user_info ) ) {
1963
+ // Get the customer, but only if it's been created
1964
+ $customer = new EDD_Customer( $this->customer_id );
1965
+
1966
+ if ( $customer->id > 0 ) {
1967
+ $name = explode( ' ', $customer->name, 2 );
1968
+ $user_info = array(
1969
+ 'first_name' => $name[0],
1970
+ 'last_name' => $name[1],
1971
+ 'email' => $customer->email,
1972
+ 'discount' => 'none',
1973
+ );
1974
+ }
1975
+ } else {
1976
+ // Get the customer, but only if it's been created
1977
+ $customer = new EDD_Customer( $this->customer_id );
1978
+ if ( $customer->id > 0 ) {
1979
+ foreach ( $user_info as $key => $value ) {
1980
+ if ( ! empty( $value ) ) {
1981
+ continue;
1982
+ }
1983
+
1984
+ switch( $key ) {
1985
+ case 'first_name':
1986
+ $name = explode( ' ', $customer->name, 2 );
1987
+
1988
+ $user_info[ $key ] = $name[0];
1989
+ break;
1990
+
1991
+ case 'last_name':
1992
+ $name = explode( ' ', $customer->name, 2 );
1993
+ $last_name = ! empty( $name[1] ) ? $name[1] : '';
1994
+
1995
+ $user_info[ $key ] = $last_name;
1996
+ break;
1997
+
1998
+ case 'email':
1999
+ $user_info[ $key ] = $customer->email;
2000
+ break;
2001
+ }
2002
+ }
2003
+
2004
+ }
2005
+ }
2006
+
2007
  return $user_info;
2008
  }
2009
 
includes/process-download.php CHANGED
@@ -218,7 +218,7 @@ function edd_process_download() {
218
  }
219
 
220
  // Set the file size header
221
- header( "Content-Length: " . filesize( $file_path ) );
222
 
223
  // Now deliver the file based on the kind of software the server is running / has enabled
224
  if ( stristr( getenv( 'SERVER_SOFTWARE' ), 'lighttpd' ) ) {
218
  }
219
 
220
  // Set the file size header
221
+ header( "Content-Length: " . @filesize( $file_path ) );
222
 
223
  // Now deliver the file based on the kind of software the server is running / has enabled
224
  if ( stristr( getenv( 'SERVER_SOFTWARE' ), 'lighttpd' ) ) {
readme.txt CHANGED
@@ -5,8 +5,8 @@ Contributors: mordauk, sunnyratilal, chriscct7, section214, sumobi, sdavis2702,
5
  Donate link: https://pippinsplugins.com/support-the-site
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce
7
  Requires at least: 4.0
8
- Tested up to: 4.5
9
- Stable Tag: 2.5.12
10
 
11
  License: GNU Version 2 or Any Later Version
12
 
@@ -214,6 +214,13 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
214
 
215
  == Changelog ==
216
 
 
 
 
 
 
 
 
217
  = 2.5.12, April 14, 2016 =
218
 
219
  * Fix: Removed incorrect title attribute from Send Test Email button
5
  Donate link: https://pippinsplugins.com/support-the-site
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce
7
  Requires at least: 4.0
8
+ Tested up to: 4.6
9
+ Stable Tag: 2.5.13
10
 
11
  License: GNU Version 2 or Any Later Version
12
 
214
 
215
  == Changelog ==
216
 
217
+ = 2.5.13, April 21, 2016 =
218
+
219
+ * Fix: User info data not properly populated from customer record when missing in payment meta
220
+ * Fix: filesize() run on external files during download process
221
+ * Tweak: Changed log in form label to include email address
222
+ * Tweak: Added PHP version, EDD version, install date, and WordPress version to opt-in tracking payload
223
+
224
  = 2.5.12, April 14, 2016 =
225
 
226
  * Fix: Removed incorrect title attribute from Send Test Email button
templates/shortcode-login.php CHANGED
@@ -12,8 +12,8 @@ if ( ! is_user_logged_in() ) :
12
  <span><legend><?php _e( 'Log into Your Account', 'easy-digital-downloads' ); ?></legend></span>
13
  <?php do_action( 'edd_login_fields_before' ); ?>
14
  <p>
15
- <label for="edd_user_login"><?php _e( 'Username', 'easy-digital-downloads' ); ?></label>
16
- <input name="edd_user_login" id="edd_user_login" class="required edd-input" type="text" title="<?php _e( 'Username', 'easy-digital-downloads' ); ?>"/>
17
  </p>
18
  <p>
19
  <label for="edd_user_pass"><?php _e( 'Password', 'easy-digital-downloads' ); ?></label>
12
  <span><legend><?php _e( 'Log into Your Account', 'easy-digital-downloads' ); ?></legend></span>
13
  <?php do_action( 'edd_login_fields_before' ); ?>
14
  <p>
15
+ <label for="edd_user_login"><?php _e( 'Username or Email', 'easy-digital-downloads' ); ?></label>
16
+ <input name="edd_user_login" id="edd_user_login" class="required edd-input" type="text" title="<?php _e( 'Username or Email', 'easy-digital-downloads' ); ?>"/>
17
  </p>
18
  <p>
19
  <label for="edd_user_pass"><?php _e( 'Password', 'easy-digital-downloads' ); ?></label>