Version Description
- Bug fix for magic checkout blank order issue.
Download this release
Release Info
Developer | razorpay |
Plugin | Razorpay for WooCommerce |
Version | 3.5.1 |
Comparing to | |
See all releases |
Code changes from version 3.5.0 to 3.5.1
- includes/razorpay-webhook.php +11 -3
- readme.txt +6 -1
- templates/rzp-pdp-checkout-btn.php +3 -3
- woo-razorpay.php +3 -3
includes/razorpay-webhook.php
CHANGED
@@ -214,13 +214,21 @@ class RZP_Webhook
|
|
214 |
|
215 |
set_transient('webhook_trigger_count_for_' . $orderId, $triggerCount, 180);
|
216 |
|
|
|
|
|
|
|
217 |
// If it is already marked as paid, ignore the event
|
218 |
-
if ($order->needs_payment() === false) {
|
219 |
-
rzpLogInfo("Woocommerce orderId: $orderId webhook process exited");
|
220 |
|
221 |
return;
|
222 |
}
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
224 |
$razorpayPaymentId = $data['payload']['payment']['entity']['id'];
|
225 |
|
226 |
$payment = $this->getPaymentEntity($razorpayPaymentId, $data);
|
214 |
|
215 |
set_transient('webhook_trigger_count_for_' . $orderId, $triggerCount, 180);
|
216 |
|
217 |
+
$orderStatus = $order->get_status();
|
218 |
+
rzpLogInfo("Woocommerce orderId: $orderId order status: $orderStatus");
|
219 |
+
|
220 |
// If it is already marked as paid, ignore the event
|
221 |
+
if ($orderStatus != 'draft' && $order->needs_payment() === false) {
|
222 |
+
rzpLogInfo("Woocommerce orderId: $orderId webhook process exited with need payment status :". $order->needs_payment());
|
223 |
|
224 |
return;
|
225 |
}
|
226 |
+
|
227 |
+
if($orderStatus == 'draft')
|
228 |
+
{
|
229 |
+
updateOrderStatus($orderId, 'wc-pending');
|
230 |
+
}
|
231 |
+
|
232 |
$razorpayPaymentId = $data['payload']['payment']['entity']['id'];
|
233 |
|
234 |
$payment = $this->getPaymentEntity($razorpayPaymentId, $data);
|
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.9
|
6 |
-
Stable tag: 3.5.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -41,8 +41,13 @@ This is compatible with WooCommerce>=2.4, including the new 3.0 release. It has
|
|
41 |
|
42 |
== Changelog ==
|
43 |
|
|
|
|
|
|
|
44 |
= 3.5.0 =
|
45 |
* Feature Auto Enable webhook.
|
|
|
|
|
46 |
* Tested up to Woocommerce 6.4.1
|
47 |
|
48 |
= 3.4.1 =
|
3 |
Tags: razorpay, payments, india, woocommerce, ecommerce
|
4 |
Requires at least: 3.9.2
|
5 |
Tested up to: 5.9
|
6 |
+
Stable tag: 3.5.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 |
+
= 3.5.1 =
|
45 |
+
* Bug fix for magic checkout blank order issue.
|
46 |
+
|
47 |
= 3.5.0 =
|
48 |
* Feature Auto Enable webhook.
|
49 |
+
* Bug fix for magic checkout mini cart refresh.
|
50 |
+
* Bug fix for smart coupon auto apply coupon in magic checkout.
|
51 |
* Tested up to Woocommerce 6.4.1
|
52 |
|
53 |
= 3.4.1 =
|
templates/rzp-pdp-checkout-btn.php
CHANGED
@@ -34,10 +34,10 @@ $productData = wp_json_encode(['id' => $product->get_id(), 'quantity' => 1]);
|
|
34 |
|
35 |
jQuery('.qty').on('change',function(e)
|
36 |
{
|
37 |
-
let
|
38 |
while (typeof quantity === 'undefined') {
|
39 |
-
var quantity = document.getElementsByClassName("qty")[
|
40 |
-
|
41 |
}
|
42 |
btnPdp.setAttribute('quantity', quantity);
|
43 |
|
34 |
|
35 |
jQuery('.qty').on('change',function(e)
|
36 |
{
|
37 |
+
let x = 0;
|
38 |
while (typeof quantity === 'undefined') {
|
39 |
+
var quantity = document.getElementsByClassName("qty")[x].value;
|
40 |
+
x++;
|
41 |
}
|
42 |
btnPdp.setAttribute('quantity', quantity);
|
43 |
|
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: 3.5.
|
7 |
-
* Stable tag: 3.5.
|
8 |
* Author: Team Razorpay
|
9 |
* WC tested up to: 6.4.1
|
10 |
* Author URI: https://razorpay.com
|
@@ -1280,7 +1280,7 @@ EOT;
|
|
1280 |
|
1281 |
rzpLogInfo("updateOrder orderId: $orderId , errorMessage: $errorMessage, razorpayPaymentId: $razorpayPaymentId , success: $success");
|
1282 |
|
1283 |
-
if (
|
1284 |
{
|
1285 |
try
|
1286 |
{
|
3 |
* Plugin Name: Razorpay for WooCommerce
|
4 |
* Plugin URI: https://razorpay.com
|
5 |
* Description: Razorpay Payment Gateway Integration for WooCommerce
|
6 |
+
* Version: 3.5.1
|
7 |
+
* Stable tag: 3.5.1
|
8 |
* Author: Team Razorpay
|
9 |
* WC tested up to: 6.4.1
|
10 |
* Author URI: https://razorpay.com
|
1280 |
|
1281 |
rzpLogInfo("updateOrder orderId: $orderId , errorMessage: $errorMessage, razorpayPaymentId: $razorpayPaymentId , success: $success");
|
1282 |
|
1283 |
+
if ($success === true)
|
1284 |
{
|
1285 |
try
|
1286 |
{
|