myCRED - Version 1.7.9.8

Version Description

Bug fixes.

=

Download this release

Release Info

Developer designbymerovingi
Plugin Icon 128x128 myCRED
Version 1.7.9.8
Comparing to
See all releases

Code changes from version 1.7.9.7 to 1.7.9.8

includes/mycred-widgets.php CHANGED
@@ -626,4 +626,4 @@ jQuery(function($) {
626
  }
627
 
628
  }
629
- endif;
626
  }
627
 
628
  }
629
+ endif;
mycred.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: myCRED
4
  * Plugin URI: https://mycred.me
5
  * Description: An adaptive points management system for WordPress powered websites.
6
- * Version: 1.7.9.7
7
  * Tags: points, credit, balance, finance, rewards, engagement, woocommerce, bbpress, buddypress
8
  * Author: myCred
9
  * Author URI: https://mycred.me
@@ -19,7 +19,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
19
  final class myCRED_Core {
20
 
21
  // Plugin Version
22
- public $version = '1.7.9.6';
23
 
24
  // Instnace
25
  protected static $_instance = NULL;
@@ -894,7 +894,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
894
  $point_type = mycred( $type_id );
895
 
896
  $history_url = add_query_arg( array( 'page' => $type_id . '-history' ), admin_url( 'users.php' ) );
897
- if ( $using_buddypress )
898
  $history_url = add_query_arg( array( 'show-ctype' => $type_id ), bp_loggedin_user_domain() . $mycred->buddypress['history_url'] . '/' );
899
 
900
  $balance = $point_type->get_users_balance( $user_id, $type_id );
3
  * Plugin Name: myCRED
4
  * Plugin URI: https://mycred.me
5
  * Description: An adaptive points management system for WordPress powered websites.
6
+ * Version: 1.7.9.8
7
  * Tags: points, credit, balance, finance, rewards, engagement, woocommerce, bbpress, buddypress
8
  * Author: myCred
9
  * Author URI: https://mycred.me
19
  final class myCRED_Core {
20
 
21
  // Plugin Version
22
+ public $version = '1.7.9.8';
23
 
24
  // Instnace
25
  protected static $_instance = NULL;
894
  $point_type = mycred( $type_id );
895
 
896
  $history_url = add_query_arg( array( 'page' => $type_id . '-history' ), admin_url( 'users.php' ) );
897
+ if ( $using_buddypress && isset( $mycred->buddypress['history_url'] ) )
898
  $history_url = add_query_arg( array( 'show-ctype' => $type_id ), bp_loggedin_user_domain() . $mycred->buddypress['history_url'] . '/' );
899
 
900
  $balance = $point_type->get_users_balance( $user_id, $type_id );
plugins/mycred-hook-woocommerce.php CHANGED
@@ -15,8 +15,10 @@ if ( ! function_exists( 'mycred_load_woocommerce_reward' ) ) :
15
  add_action( 'add_meta_boxes_product', 'mycred_woo_add_product_metabox' );
16
  add_action( 'save_post_product', 'mycred_woo_save_reward_settings' );
17
  add_action( 'woocommerce_payment_complete', 'mycred_woo_payout_rewards' );
 
18
  add_action( 'woocommerce_product_after_variable_attributes', 'mycred_woo_add_product_variation_detail', 10, 3 );
19
  add_action( 'woocommerce_save_product_variation', 'mycred_woo_save_product_variation_detail' );
 
20
 
21
  }
22
  endif;
@@ -168,6 +170,22 @@ if ( ! function_exists( 'mycred_woo_add_product_variation_detail' ) ) :
168
  }
169
  endif;
170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  /**
172
  * Save Reward Setup
173
  * @since 1.5
15
  add_action( 'add_meta_boxes_product', 'mycred_woo_add_product_metabox' );
16
  add_action( 'save_post_product', 'mycred_woo_save_reward_settings' );
17
  add_action( 'woocommerce_payment_complete', 'mycred_woo_payout_rewards' );
18
+ add_action( 'woocommerce_order_status_completed', 'mycred_woo_payout_rewards' );
19
  add_action( 'woocommerce_product_after_variable_attributes', 'mycred_woo_add_product_variation_detail', 10, 3 );
20
  add_action( 'woocommerce_save_product_variation', 'mycred_woo_save_product_variation_detail' );
21
+ add_filter( 'mycred_run_this', 'mycred_woo_refund_points' );
22
 
23
  }
24
  endif;
170
  }
171
  endif;
172
 
173
+
174
+ /**
175
+ * WooCommerce Points Refund
176
+ * @since 1.7.9.8
177
+ * @version 1.0
178
+ */
179
+ if ( ! function_exists( 'mycred_woo_refund_points' ) ) :
180
+ function mycred_woo_refund_points( $request ) {
181
+
182
+ if( $request['ref'] == 'woocommerce_refund' )
183
+ $request['amount'] = abs($request['amount']);
184
+
185
+ return $request;
186
+ }
187
+ endif;
188
+
189
  /**
190
  * Save Reward Setup
191
  * @since 1.5
readme.txt CHANGED
@@ -2,8 +2,9 @@
2
  Contributors: mycred ,wpexpertsio
3
  Tags: point, credit, loyalty program, engagement, reward
4
  Requires at least: 4.5
5
- Tested up to: 4.9
6
- Stable tag: 1.7.9.7
 
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -94,7 +95,7 @@ You can find a list of [frequently asked questions](https://mycred.me/about/faq/
94
  == Upgrade Notice ==
95
 
96
 
97
- = 1.7.9.4 =
98
  Bug fixes.
99
 
100
 
@@ -119,23 +120,15 @@ Bug fixes.
119
 
120
  == Changelog ==
121
 
 
 
 
 
 
122
  = 1.7.9.7 =
123
  FIX – Points for clicking on links
124
  FIX – Point for viewing videos
125
  FIX – Exchange points from one point type to another point type
126
 
127
- = 1.7.9.6 =
128
- FIX - Version error
129
-
130
- = 1.7.9.5 =
131
- FIX - Notification error.
132
-
133
-
134
- = 1.7.9.4 =
135
- FIX - Compatible with php 7.2.
136
- FIX - Points Log pagination issue.
137
- FIX - Reset all to zero myCred default balance meta key .
138
- Tested with WordPress 4.9 beta3
139
-
140
  = Previous Versions =
141
  https://mycred.me/support/changelog/
2
  Contributors: mycred ,wpexpertsio
3
  Tags: point, credit, loyalty program, engagement, reward
4
  Requires at least: 4.5
5
+ Tested up to: 5.0.1
6
+ Requires PHP: 7.0
7
+ Stable tag: 1.7.9.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
95
  == Upgrade Notice ==
96
 
97
 
98
+ = 1.7.9.8 =
99
  Bug fixes.
100
 
101
 
120
 
121
  == Changelog ==
122
 
123
+ = 1.7.9.8 =
124
+ Tested with WordPress 5.0
125
+ FIX – Refund points on WooCommerce order refund
126
+ FIX - Reward points on WooCommerce order completed
127
+
128
  = 1.7.9.7 =
129
  FIX – Points for clicking on links
130
  FIX – Point for viewing videos
131
  FIX – Exchange points from one point type to another point type
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  = Previous Versions =
134
  https://mycred.me/support/changelog/