Razorpay for WooCommerce - Version 2.8.3

Version Description

  • Updated Route module settings and added a note for creating reverse transfer.
  • Tested up to Woocommerce 5.9.0
Download this release

Release Info

Developer razorpay
Plugin Icon 128x128 Razorpay for WooCommerce
Version 2.8.3
Comparing to
See all releases

Code changes from version 2.8.2 to 2.8.3

includes/razorpay-route-actions.php CHANGED
@@ -264,22 +264,4 @@ class RZP_Route_Action
264
 
265
  }
266
 
267
- public static function addRouteModuleFormFields($defaultFormFields){
268
- if( get_woocommerce_currency() == "INR") {
269
-
270
- $routeEnableFields = array(
271
- 'route_enable' => array(
272
- 'title' => __('Route Module'),
273
- 'type' => 'checkbox',
274
- 'label' => __('Enable route module?'),
275
- 'description' => "<span>For Route payments / transfers, first create a linked account <a href='https://dashboard.razorpay.com/app/route/payments' target='_blank'>here</a></span><br/><br/>Route Documentation - <a href='https://razorpay.com/docs/route/' target='_blank'>View</a>",
276
- 'default' => 'no'
277
- )
278
- );
279
- $defaultFormFields = array_merge($defaultFormFields, $routeEnableFields);
280
- }
281
-
282
- return $defaultFormFields;
283
- }
284
-
285
  }
264
 
265
  }
266
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  }
includes/razorpay-route.php CHANGED
@@ -6,6 +6,7 @@ require_once __DIR__ .'/../razorpay-sdk/Razorpay.php';
6
  use Razorpay\Api\Api;
7
  use Razorpay\Api\Errors;
8
 
 
9
  add_action('admin_post_rzp_direct_transfer', 'razorpayDirectTransfer');
10
  add_action('admin_post_rzp_reverse_transfer', 'razorpayReverseTransfer');
11
  add_action('admin_post_rzp_settlement_change', 'razorpaySettlementUpdate');
@@ -14,6 +15,22 @@ add_action('admin_post_rzp_payment_transfer', 'razorpayPaymentTransfer');
14
  add_action( 'check_route_enable_status', 'razorpayRouteModule',0 );
15
  do_action('check_route_enable_status');
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  function razorpayRouteModule(){
18
 
19
  if(isset(get_option('woocommerce_razorpay_settings')['route_enable'])){
@@ -1160,6 +1177,8 @@ function renderPaymentTransferMetaBox() {
1160
  $transfersData = $api->request->request("GET", $url);
1161
 
1162
  if(!empty($transfersData['items'])) {
 
 
1163
  echo '<table class="wp-list-table widefat fixed striped table-view-list wp_list_test_links">
1164
  <thead>
1165
  <tr>
6
  use Razorpay\Api\Api;
7
  use Razorpay\Api\Errors;
8
 
9
+ add_action('setup_extra_setting_fields', 'addRouteModuleSettingFields');
10
  add_action('admin_post_rzp_direct_transfer', 'razorpayDirectTransfer');
11
  add_action('admin_post_rzp_reverse_transfer', 'razorpayReverseTransfer');
12
  add_action('admin_post_rzp_settlement_change', 'razorpaySettlementUpdate');
15
  add_action( 'check_route_enable_status', 'razorpayRouteModule',0 );
16
  do_action('check_route_enable_status');
17
 
18
+ function addRouteModuleSettingFields(&$defaultFormFields){
19
+ if( get_woocommerce_currency() == "INR") {
20
+
21
+ $routeEnableFields = array(
22
+ 'route_enable' => array(
23
+ 'title' => __('Route Module'),
24
+ 'type' => 'checkbox',
25
+ 'label' => __('Enable route module?'),
26
+ 'description' => "<span>For Route payments / transfers, first create a linked account <a href='https://dashboard.razorpay.com/app/route/payments' target='_blank'>here</a></span><br/><br/>Route Documentation - <a href='https://razorpay.com/docs/route/' target='_blank'>View</a>",
27
+ 'default' => 'no'
28
+ )
29
+ );
30
+ $defaultFormFields = array_merge($defaultFormFields, $routeEnableFields);
31
+ }
32
+ }
33
+
34
  function razorpayRouteModule(){
35
 
36
  if(isset(get_option('woocommerce_razorpay_settings')['route_enable'])){
1177
  $transfersData = $api->request->request("GET", $url);
1178
 
1179
  if(!empty($transfersData['items'])) {
1180
+ echo '<p><b>NOTE: </b>When refunding a payment that has transfers, create reversal from here and then refund the payment to the customer</p>';
1181
+
1182
  echo '<table class="wp-list-table widefat fixed striped table-view-list wp_list_test_links">
1183
  <thead>
1184
  <tr>
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: razorpay
3
  Tags: razorpay, payments, india, woocommerce, ecommerce
4
  Requires at least: 3.9.2
5
- Tested up to: 5.7.2
6
- Stable tag: 2.8.2
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -41,6 +41,10 @@ This is compatible with WooCommerce>=2.4, including the new 3.0 release. It has
41
 
42
  == Changelog ==
43
 
 
 
 
 
44
  = 2.8.2 =
45
  * Updated Razorpay SDK.
46
  * Added subscription webhook events.
2
  Contributors: razorpay
3
  Tags: razorpay, payments, india, woocommerce, ecommerce
4
  Requires at least: 3.9.2
5
+ Tested up to: 5.8.2
6
+ Stable tag: 2.8.3
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
41
 
42
  == Changelog ==
43
 
44
+ = 2.8.3 =
45
+ * Updated Route module settings and added a note for creating reverse transfer.
46
+ * Tested up to Woocommerce 5.9.0
47
+
48
  = 2.8.2 =
49
  * Updated Razorpay SDK.
50
  * Added subscription webhook events.
woo-razorpay.php CHANGED
@@ -3,8 +3,8 @@
3
  * Plugin Name: Razorpay for WooCommerce
4
  * Plugin URI: https://razorpay.com
5
  * Description: Razorpay Payment Gateway Integration for WooCommerce
6
- * Version: 2.8.2
7
- * Stable tag: 2.8.2
8
  * Author: Team Razorpay
9
  * WC tested up to: 5.9.0
10
  * Author URI: https://razorpay.com
@@ -26,7 +26,6 @@ use Razorpay\Api\Errors;
26
 
27
  add_action('plugins_loaded', 'woocommerce_razorpay_init', 0);
28
  add_action('admin_post_nopriv_rzp_wc_webhook', 'razorpay_webhook_init', 10);
29
- add_filter('route_module_setting_fields', array( "RZP_Route_Action", "addRouteModuleFormFields" ));
30
 
31
  function woocommerce_razorpay_init()
32
  {
@@ -258,8 +257,6 @@ function woocommerce_razorpay_init()
258
  ),
259
 
260
  );
261
- /* adds route enable form fields to the defaultFormFields */
262
- $defaultFormFields = apply_filters( 'route_module_setting_fields', $defaultFormFields );
263
 
264
  do_action_ref_array( 'setup_extra_setting_fields', array( &$defaultFormFields ) );
265
 
3
  * Plugin Name: Razorpay for WooCommerce
4
  * Plugin URI: https://razorpay.com
5
  * Description: Razorpay Payment Gateway Integration for WooCommerce
6
+ * Version: 2.8.3
7
+ * Stable tag: 2.8.3
8
  * Author: Team Razorpay
9
  * WC tested up to: 5.9.0
10
  * Author URI: https://razorpay.com
26
 
27
  add_action('plugins_loaded', 'woocommerce_razorpay_init', 0);
28
  add_action('admin_post_nopriv_rzp_wc_webhook', 'razorpay_webhook_init', 10);
 
29
 
30
  function woocommerce_razorpay_init()
31
  {
257
  ),
258
 
259
  );
 
 
260
 
261
  do_action_ref_array( 'setup_extra_setting_fields', array( &$defaultFormFields ) );
262