Razorpay for WooCommerce - Version 2.8.1

Version Description

  • Bug fix in custom woocommerce order number issue.
  • Tested up to Woocommerce 5.9.0
Download this release

Release Info

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

Code changes from version 2.8.0 to 2.8.1

Files changed (2) hide show
  1. readme.txt +5 -1
  2. woo-razorpay.php +13 -7
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.0
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.0 =
45
  * Added Route module to split payments and transfer funds to Linked accounts.
46
  * Tested up to Woocommerce 5.8.0
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.1
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.1 =
45
+ * Bug fix in custom woocommerce order number issue.
46
+ * Tested up to Woocommerce 5.9.0
47
+
48
  = 2.8.0 =
49
  * Added Route module to split payments and transfer funds to Linked accounts.
50
  * Tested up to Woocommerce 5.8.0
woo-razorpay.php CHANGED
@@ -3,10 +3,10 @@
3
  * Plugin Name: Razorpay for WooCommerce
4
  * Plugin URI: https://razorpay.com
5
  * Description: Razorpay Payment Gateway Integration for WooCommerce
6
- * Version: 2.8.0
7
- * Stable tag: 2.8.0
8
  * Author: Team Razorpay
9
- * WC tested up to: 5.8.0
10
  * Author URI: https://razorpay.com
11
  */
12
 
@@ -586,7 +586,9 @@ function woocommerce_razorpay_init()
586
 
587
  $orderId = $order->get_order_number();
588
 
589
- $callbackUrl = $this->getRedirectUrl($orderId);
 
 
590
 
591
  $sessionKey = $this->getOrderSessionKey($orderId);
592
  $razorpayOrderId = get_transient($sessionKey);
@@ -599,7 +601,8 @@ function woocommerce_razorpay_init()
599
  'currency' => self::INR,
600
  'description' => $productinfo,
601
  'notes' => array(
602
- self::WC_ORDER_ID => $orderId
 
603
  ),
604
  'order_id' => $razorpayOrderId,
605
  'callback_url' => $callbackUrl,
@@ -819,7 +822,7 @@ function woocommerce_razorpay_init()
819
  {
820
  $data["_"] = $this->getVersionMetaInfo($data);
821
 
822
- $wooOrderId = $data['notes']['woocommerce_order_id'];
823
 
824
  $redirectUrl = $this->getRedirectUrl($wooOrderId);
825
 
@@ -1116,7 +1119,10 @@ EOT;
1116
  if($this->getSetting('route_enable') == 'yes')
1117
  {
1118
  $razorpayRoute = new RZP_Route_Action();
1119
- $razorpayRoute->transferFromPayment($orderId, $razorpayPaymentId); // creates transfers from payment
 
 
 
1120
  }
1121
 
1122
  if($virtualAccountId != null)
3
  * Plugin Name: Razorpay for WooCommerce
4
  * Plugin URI: https://razorpay.com
5
  * Description: Razorpay Payment Gateway Integration for WooCommerce
6
+ * Version: 2.8.1
7
+ * Stable tag: 2.8.1
8
  * Author: Team Razorpay
9
+ * WC tested up to: 5.9.0
10
  * Author URI: https://razorpay.com
11
  */
12
 
586
 
587
  $orderId = $order->get_order_number();
588
 
589
+ $wcOrderId = $order->get_id();
590
+
591
+ $callbackUrl = $this->getRedirectUrl($wcOrderId);
592
 
593
  $sessionKey = $this->getOrderSessionKey($orderId);
594
  $razorpayOrderId = get_transient($sessionKey);
601
  'currency' => self::INR,
602
  'description' => $productinfo,
603
  'notes' => array(
604
+ self::WC_ORDER_ID => $orderId,
605
+ self::WC_ORDER_NUMBER => $wcOrderId
606
  ),
607
  'order_id' => $razorpayOrderId,
608
  'callback_url' => $callbackUrl,
822
  {
823
  $data["_"] = $this->getVersionMetaInfo($data);
824
 
825
+ $wooOrderId = $data['notes']['woocommerce_order_number'];
826
 
827
  $redirectUrl = $this->getRedirectUrl($wooOrderId);
828
 
1119
  if($this->getSetting('route_enable') == 'yes')
1120
  {
1121
  $razorpayRoute = new RZP_Route_Action();
1122
+
1123
+ $wcOrderId = $order->get_id();
1124
+
1125
+ $razorpayRoute->transferFromPayment($wcOrderId, $razorpayPaymentId); // creates transfers from payment
1126
  }
1127
 
1128
  if($virtualAccountId != null)