Easy Digital Downloads - Version 2.5.14

Version Description

Download this release

Release Info

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

Code changes from version 2.5.13 to 2.5.14

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.13
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.13
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.13' );
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.14
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.14
29
  */
30
 
31
  // Exit if accessed directly.
186
 
187
  // Plugin version.
188
  if ( ! defined( 'EDD_VERSION' ) ) {
189
+ define( 'EDD_VERSION', '2.5.14' );
190
  }
191
 
192
  // Plugin Folder Path.
includes/admin/tracking.php CHANGED
@@ -52,8 +52,7 @@ class EDD_Tracking {
52
  * @return bool
53
  */
54
  private function tracking_allowed() {
55
- $allow_tracking = edd_get_option( 'allow_tracking', false );
56
- return $allow_tracking;
57
  }
58
 
59
  /**
@@ -103,6 +102,7 @@ class EDD_Tracking {
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
  }
@@ -115,13 +115,15 @@ class EDD_Tracking {
115
  */
116
  public function send_checkin( $override = false ) {
117
 
118
- if( ! $this->tracking_allowed() && ! $override )
119
- return;
 
120
 
121
  // Send a maximum of once per week
122
  $last_send = $this->get_last_send();
123
- if( $last_send && $last_send > strtotime( '-1 week' ) )
124
- return;
 
125
 
126
  $this->setup_data();
127
 
@@ -135,8 +137,14 @@ class EDD_Tracking {
135
  'user-agent' => 'EDD/' . EDD_VERSION . '; ' . get_bloginfo( 'url' )
136
  ) );
137
 
 
 
 
 
138
  update_option( 'edd_tracking_last_send', time() );
139
 
 
 
140
  }
141
 
142
  /**
52
  * @return bool
53
  */
54
  private function tracking_allowed() {
55
+ return (bool) edd_get_option( 'allow_tracking', false );
 
56
  }
57
 
58
  /**
102
  $data['inactive_plugins'] = $plugins;
103
  $data['products'] = wp_count_posts( 'download' )->publish;
104
  $data['download_label'] = edd_get_label_singular( true );
105
+ $data['locale'] = get_locale();
106
 
107
  $this->data = $data;
108
  }
115
  */
116
  public function send_checkin( $override = false ) {
117
 
118
+ if( ! $this->tracking_allowed() && ! $override ) {
119
+ return false;
120
+ }
121
 
122
  // Send a maximum of once per week
123
  $last_send = $this->get_last_send();
124
+ if( $last_send && $last_send > strtotime( '-1 week' ) ) {
125
+ return false;
126
+ }
127
 
128
  $this->setup_data();
129
 
137
  'user-agent' => 'EDD/' . EDD_VERSION . '; ' . get_bloginfo( 'url' )
138
  ) );
139
 
140
+ if( is_wp_error( $request ) ) {
141
+ return $request;
142
+ }
143
+
144
  update_option( 'edd_tracking_last_send', time() );
145
 
146
+ return true;
147
+
148
  }
149
 
150
  /**
includes/user-functions.php CHANGED
@@ -487,11 +487,10 @@ function edd_new_user_notification( $user_id = 0, $user_data = array() ) {
487
  return;
488
  }
489
 
 
490
  $from_name = edd_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) );
491
  $from_email = edd_get_option( 'from_email', get_bloginfo( 'admin_email' ) );
492
 
493
- $emails = EDD()->emails;
494
-
495
  $emails->__set( 'from_name', $from_name );
496
  $emails->__set( 'from_email', $from_email );
497
 
487
  return;
488
  }
489
 
490
+ $emails = new EDD_Emails;
491
  $from_name = edd_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) );
492
  $from_email = edd_get_option( 'from_email', get_bloginfo( 'admin_email' ) );
493
 
 
 
494
  $emails->__set( 'from_name', $from_name );
495
  $emails->__set( 'from_email', $from_email );
496
 
readme.txt CHANGED
@@ -6,7 +6,7 @@ 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,6 +214,12 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
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
@@ -238,7 +244,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
238
  * Fix: Sessions should never start on RSS feeds
239
  * Fix: Missing screen reader text for Default Price Option radio buttons
240
  * Fix: Incorrect heading size for some admin screens
241
- * Fix: Payment History Search results now stay after performing actions on shown payments
242
  * Tweak: Added new filters to recount stats tool for customers to allow support for other payment statuses
243
  * Tweak: Added new filters to allow URIs to be added to the session blacklist to prevent sessions from starting on those URIs
244
  * Tweak: Added filter to permit disabling wpautop() in emails
@@ -290,10 +296,10 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
290
  * Fix: Price override in add_download() method of EDD_Payment does not respect price of 0
291
  * Fix: Dash incorrectly shown after product name on the receipt page
292
  * Fix: Missing P tag on View Order Details screen
293
- * Tweak: Replace usage of $edd_options with edd_get_option() helper function
294
  * Tweak: URL in New User Notification email now linked
295
  * Tweak: edd_price() now displays the value of the Default price option
296
- * New: Introduced edd_payment_currency_default filter
297
 
298
  = 2.5.7, February 10, 2016 =
299
 
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.14
10
 
11
  License: GNU Version 2 or Any Later Version
12
 
214
 
215
  == Changelog ==
216
 
217
+ = 2.5.14, May 5, 2016 =
218
+
219
+ * Fix: New user emails do not have the proper heading
220
+ * Fix: Opt-in tracking not always sending when allowed
221
+ * Tweak: Added Locale to opt-in tracking
222
+
223
  = 2.5.13, April 21, 2016 =
224
 
225
  * Fix: User info data not properly populated from customer record when missing in payment meta
244
  * Fix: Sessions should never start on RSS feeds
245
  * Fix: Missing screen reader text for Default Price Option radio buttons
246
  * Fix: Incorrect heading size for some admin screens
247
+ * Fix: Payment History Search results now stay after performing actions on shown payments
248
  * Tweak: Added new filters to recount stats tool for customers to allow support for other payment statuses
249
  * Tweak: Added new filters to allow URIs to be added to the session blacklist to prevent sessions from starting on those URIs
250
  * Tweak: Added filter to permit disabling wpautop() in emails
296
  * Fix: Price override in add_download() method of EDD_Payment does not respect price of 0
297
  * Fix: Dash incorrectly shown after product name on the receipt page
298
  * Fix: Missing P tag on View Order Details screen
299
+ * Tweak: Replace usage of $edd_options with edd_get_option() helper function
300
  * Tweak: URL in New User Notification email now linked
301
  * Tweak: edd_price() now displays the value of the Default price option
302
+ * New: Introduced edd_payment_currency_default filter
303
 
304
  = 2.5.7, February 10, 2016 =
305