myCRED - Version 2.4.2

Version Description

  • SQL query optimization
Download this release

Release Info

Developer wpexpertsio
Plugin Icon 128x128 myCRED
Version 2.4.2
Comparing to
See all releases

Code changes from version 2.4.1 to 2.4.2

addons/ranks/includes/mycred-rank-functions.php CHANGED
@@ -627,7 +627,7 @@ if ( ! function_exists( 'mycred_get_users_of_rank' ) ) :
627
  FROM {$wpdb->users} users
628
  LEFT JOIN {$wpdb->usermeta} mycredrank ON ( users.ID = mycredrank.user_id AND mycredrank.meta_key = %s )
629
  LEFT JOIN {$wpdb->usermeta} creds ON ( users.ID = creds.user_id AND creds.meta_key = %s )
630
- WHERE rank.meta_value = %d
631
  ORDER BY creds.meta_value+0 DESC LIMIT 25;", $rank_meta_key, $balance_key, $rank_id ) );
632
 
633
  wp_cache_set( $cache_key, $users, MYCRED_SLUG );
627
  FROM {$wpdb->users} users
628
  LEFT JOIN {$wpdb->usermeta} mycredrank ON ( users.ID = mycredrank.user_id AND mycredrank.meta_key = %s )
629
  LEFT JOIN {$wpdb->usermeta} creds ON ( users.ID = creds.user_id AND creds.meta_key = %s )
630
+ WHERE mycredrank.meta_value = %d
631
  ORDER BY creds.meta_value+0 DESC LIMIT 25;", $rank_meta_key, $balance_key, $rank_id ) );
632
 
633
  wp_cache_set( $cache_key, $users, MYCRED_SLUG );
includes/classes/class.query-leaderboard.php CHANGED
@@ -815,6 +815,7 @@ if ( ! class_exists( 'myCRED_Query_Leaderboard' ) ) :
815
  $balance_format = 'CAST( %f AS DECIMAL( ' . $length . ', ' . $this->core->format['decimals'] . ' ) )';
816
  }
817
 
 
818
  $query = $wpdb->prepare( "AND l.meta_value != {$balance_format}", $this->core->zero() );
819
 
820
  }
815
  $balance_format = 'CAST( %f AS DECIMAL( ' . $length . ', ' . $this->core->format['decimals'] . ' ) )';
816
  }
817
 
818
+ if ( ! $this->args['total'] )
819
  $query = $wpdb->prepare( "AND l.meta_value != {$balance_format}", $this->core->zero() );
820
 
821
  }
mycred.php CHANGED
@@ -3,13 +3,13 @@
3
  * Plugin Name: myCred
4
  * Plugin URI: https://mycred.me
5
  * Description: An adaptive points management system for WordPress powered websites.
6
- * Version: 2.4.1
7
  * Tags: point, credit, loyalty program, engagement, reward, woocommerce rewards
8
  * Author: myCred
9
  * Author URI: https://mycred.me
10
  * Author Email: support@mycred.me
11
  * Requires at least: WP 4.8
12
- * Tested up to: WP 5.8.2
13
  * Text Domain: mycred
14
  * Domain Path: /lang
15
  * License: GPLv2 or later
@@ -20,7 +20,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
20
  final class myCRED_Core {
21
 
22
  // Plugin Version
23
- public $version = '2.4.1';
24
 
25
  // Instnace
26
  protected static $_instance = NULL;
3
  * Plugin Name: myCred
4
  * Plugin URI: https://mycred.me
5
  * Description: An adaptive points management system for WordPress powered websites.
6
+ * Version: 2.4.2
7
  * Tags: point, credit, loyalty program, engagement, reward, woocommerce rewards
8
  * Author: myCred
9
  * Author URI: https://mycred.me
10
  * Author Email: support@mycred.me
11
  * Requires at least: WP 4.8
12
+ * Tested up to: WP 5.8.3
13
  * Text Domain: mycred
14
  * Domain Path: /lang
15
  * License: GPLv2 or later
20
  final class myCRED_Core {
21
 
22
  // Plugin Version
23
+ public $version = '2.4.2';
24
 
25
  // Instnace
26
  protected static $_instance = NULL;
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: mycred,wpexpertsio
3
  Tags: badges, gamification, loyalty, points, rewards
4
  Requires at least: 4.8
5
- Tested up to: 5.8.2
6
- Stable tag: 2.4.1
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -348,6 +348,9 @@ The banking module have been replaced by Central deposite module, and interest r
348
 
349
  == Changelog ==
350
 
 
 
 
351
  = 2.4.1 =
352
  - **NEW** - Added new attributes "streaming" and "duration" in mycred_video shortcode.
353
  - **NEW** - Added filter "mycred_transfer_notices".
2
  Contributors: mycred,wpexpertsio
3
  Tags: badges, gamification, loyalty, points, rewards
4
  Requires at least: 4.8
5
+ Tested up to: 5.9
6
+ Stable tag: 2.4.2
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
348
 
349
  == Changelog ==
350
 
351
+ = 2.4.2 =
352
+ - SQL query optimization
353
+
354
  = 2.4.1 =
355
  - **NEW** - Added new attributes "streaming" and "duration" in mycred_video shortcode.
356
  - **NEW** - Added filter "mycred_transfer_notices".