Easy Digital Downloads - Version 2.9.6

Version Description

Download this release

Release Info

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

Code changes from version 2.9.5 to 2.9.6

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.9.5
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.9.5
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.9.5' );
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.9.6
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
+ * @version 2.9.6
29
  */
30
 
31
  // Exit if accessed directly.
206
 
207
  // Plugin version.
208
  if ( ! defined( 'EDD_VERSION' ) ) {
209
+ define( 'EDD_VERSION', '2.9.6' );
210
  }
211
 
212
  // Plugin Folder Path.
includes/admin/upgrades/classes/class-file-download-log-migration.php CHANGED
@@ -204,7 +204,7 @@ class EDD_File_Download_Log_Migration extends EDD_Batch_Export {
204
  update_option( 'edd_fdlm_term_tax_id', $term_tax_id );
205
 
206
  // Count the number of entries!
207
- $log_id_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT (*) FROM {$wpdb->term_relationships} WHERE term_taxonomy_id = %d", $term_tax_id ) );
208
  }
209
  }
210
 
204
  update_option( 'edd_fdlm_term_tax_id', $term_tax_id );
205
 
206
  // Count the number of entries!
207
+ $log_id_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->term_relationships} WHERE term_taxonomy_id = %d", $term_tax_id ) );
208
  }
209
  }
210
 
includes/process-purchase.php CHANGED
@@ -595,27 +595,19 @@ function edd_purchase_form_validate_new_user() {
595
  edd_set_error( 'username_unavailable', __( 'Username already taken', 'easy-digital-downloads' ) );
596
  // Check if it's valid
597
  } else if ( ! edd_validate_username( $user_login ) ) {
598
- // Invalid username
599
- if ( is_multisite() )
600
- edd_set_error( 'username_invalid', __( 'Invalid username. Only lowercase letters (a-z) and numbers are allowed', 'easy-digital-downloads' ) );
601
- else
602
- edd_set_error( 'username_invalid', __( 'Invalid username', 'easy-digital-downloads' ) );
603
  } else {
 
 
 
604
  // All the checks have run and it's good to go
605
  $valid_user_data['user_login'] = $user_login;
606
  }
607
  } else {
608
  if ( edd_no_guest_checkout() ) {
609
  edd_set_error( 'registration_required', __( 'You must register or login to complete your purchase', 'easy-digital-downloads' ) );
610
- } else {
611
- // If the entered email is attached to a user account, they must log in. Otherwise you can add purchases/CC to an account you do not own.
612
- $user = get_user_by( 'email', $user_email );
613
-
614
- if ( $user ) {
615
- edd_set_error( 'login_required', __( 'You must login to complete your purchase', 'easy-digital-downloads' ) );
616
- } else {
617
- edd_set_error( 'registration_required', __( 'You must register or login to complete your purchase', 'easy-digital-downloads' ) );
618
- }
619
  }
620
  }
621
 
@@ -768,13 +760,6 @@ function edd_purchase_form_validate_guest_user() {
768
  // All is good to go
769
  $valid_user_data['user_email'] = $guest_email;
770
 
771
- // We have a valid email, but if that email is attached to a user account, they must log in. Otherwise you can add purchases/CC to an account you do not own.
772
- $user = get_user_by( 'email', $guest_email );
773
-
774
- if ( $user ) {
775
- edd_set_error( 'login_required', __( 'You must login to complete your purchase', 'easy-digital-downloads' ) );
776
- }
777
-
778
  }
779
  } else {
780
  // No email
595
  edd_set_error( 'username_unavailable', __( 'Username already taken', 'easy-digital-downloads' ) );
596
  // Check if it's valid
597
  } else if ( ! edd_validate_username( $user_login ) ) {
598
+ // Invalid username
599
+ if ( is_multisite() ) {
600
+ edd_set_error( 'username_invalid', __( 'Invalid username. Only lowercase letters (a-z) and numbers are allowed', 'easy-digital-downloads' ) );
 
 
601
  } else {
602
+ edd_set_error( 'username_invalid', __( 'Invalid username', 'easy-digital-downloads' ) );
603
+ }
604
+ } else {
605
  // All the checks have run and it's good to go
606
  $valid_user_data['user_login'] = $user_login;
607
  }
608
  } else {
609
  if ( edd_no_guest_checkout() ) {
610
  edd_set_error( 'registration_required', __( 'You must register or login to complete your purchase', 'easy-digital-downloads' ) );
 
 
 
 
 
 
 
 
 
611
  }
612
  }
613
 
760
  // All is good to go
761
  $valid_user_data['user_email'] = $guest_email;
762
 
 
 
 
 
 
 
 
763
  }
764
  } else {
765
  // No email
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.4
8
  Tested up to: 4.9.7
9
- Stable Tag: 2.9.5
10
  License: GNU Version 2 or Any Later Version
11
 
12
  The easiest way to sell digital products with WordPress.
@@ -190,6 +190,10 @@ Yes. Easy Digital Downloads also includes default support for Amazon Payments an
190
 
191
  == Changelog ==
192
 
 
 
 
 
193
  = 2.9.5, July 12, 2018 =
194
  * Fix: Changing the country field in the admin would not display the State fields.
195
  * Fix: File Download Log Migration from version 2.9.2 would fail on some sites.
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce, ecommerce, ebook
7
  Requires at least: 4.4
8
  Tested up to: 4.9.7
9
+ Stable Tag: 2.9.6
10
  License: GNU Version 2 or Any Later Version
11
 
12
  The easiest way to sell digital products with WordPress.
190
 
191
  == Changelog ==
192
 
193
+ = 2.9.6, July 16, 2018 =
194
+ * Fix: "Error: You must login to complete your purchase" shown incorrectly on checkout.
195
+ * Fix: WordPress database error in File Download Log updater.
196
+
197
  = 2.9.5, July 12, 2018 =
198
  * Fix: Changing the country field in the admin would not display the State fields.
199
  * Fix: File Download Log Migration from version 2.9.2 would fail on some sites.