Version Description
- Fix the latency issue.
- Bug fix in coupon fetch API.
Download this release
Release Info
Developer | razorpay |
Plugin | Razorpay for WooCommerce |
Version | 3.2.1 |
Comparing to | |
See all releases |
Code changes from version 3.2.0 to 3.2.1
- includes/api/cart.php +0 -5
- includes/api/coupon-get.php +4 -0
- readme.txt +5 -1
- woo-razorpay.php +25 -11
includes/api/cart.php
CHANGED
@@ -11,11 +11,6 @@ function create1ccCart($orderId)
|
|
11 |
global $woocommerce;
|
12 |
|
13 |
$order = wc_get_order($orderId);
|
14 |
-
try {
|
15 |
-
rzpLogInfo('# order count');
|
16 |
-
rzpLogInfo($order->get_item_count());
|
17 |
-
} catch (\Exception $e) {
|
18 |
-
}
|
19 |
|
20 |
$variationAttributes = [];
|
21 |
if ($order && $order->get_item_count() > 0) {
|
11 |
global $woocommerce;
|
12 |
|
13 |
$order = wc_get_order($orderId);
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
$variationAttributes = [];
|
16 |
if ($order && $order->get_item_count() > 0) {
|
includes/api/coupon-get.php
CHANGED
@@ -62,6 +62,10 @@ function getCouponList($request)
|
|
62 |
'value' => array('fixed_cart', 'percent', 'fixed_product'),
|
63 |
'compare' => 'IN',
|
64 |
),
|
|
|
|
|
|
|
|
|
65 |
),
|
66 |
'fields' => 'ids',
|
67 |
'posts_per_page' => -1, // By default WP_Query will return only 10 posts, to avoid that we need to pass -1
|
62 |
'value' => array('fixed_cart', 'percent', 'fixed_product'),
|
63 |
'compare' => 'IN',
|
64 |
),
|
65 |
+
array(
|
66 |
+
'key' => 'coupon_generated_by',
|
67 |
+
'compare' => 'NOT EXISTS',
|
68 |
+
),
|
69 |
),
|
70 |
'fields' => 'ids',
|
71 |
'posts_per_page' => -1, // By default WP_Query will return only 10 posts, to avoid that we need to pass -1
|
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.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 |
= 3.2.0 =
|
45 |
* Version bump to 3.2.0
|
46 |
* Tested up to Woocommerce 6.2.2
|
3 |
Tags: razorpay, payments, india, woocommerce, ecommerce
|
4 |
Requires at least: 3.9.2
|
5 |
Tested up to: 5.9
|
6 |
+
Stable tag: 3.2.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.2.1 =
|
45 |
+
* Fix the latency issue.
|
46 |
+
* Bug fix in coupon fetch API.
|
47 |
+
|
48 |
= 3.2.0 =
|
49 |
* Version bump to 3.2.0
|
50 |
* Tested up to Woocommerce 6.2.2
|
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.2.
|
7 |
-
* Stable tag: 3.2.
|
8 |
* Author: Team Razorpay
|
9 |
* WC tested up to: 6.2.2
|
10 |
* Author URI: https://razorpay.com
|
@@ -149,18 +149,32 @@ function woocommerce_razorpay_init()
|
|
149 |
// 1cc flags should be enabled only if merchant has access to 1cc feature
|
150 |
$is1ccAvailable = false;
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
|
|
155 |
|
156 |
-
|
157 |
-
$
|
158 |
-
|
|
|
|
|
|
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
|
165 |
if ($is1ccAvailable) {
|
166 |
$this->visibleSettings = array_merge($this->visibleSettings, array(
|
3 |
* Plugin Name: Razorpay for WooCommerce
|
4 |
* Plugin URI: https://razorpay.com
|
5 |
* Description: Razorpay Payment Gateway Integration for WooCommerce
|
6 |
+
* Version: 3.2.1
|
7 |
+
* Stable tag: 3.2.1
|
8 |
* Author: Team Razorpay
|
9 |
* WC tested up to: 6.2.2
|
10 |
* Author URI: https://razorpay.com
|
149 |
// 1cc flags should be enabled only if merchant has access to 1cc feature
|
150 |
$is1ccAvailable = false;
|
151 |
|
152 |
+
// Check whether the get_current_screen function exists because it is loaded only after 'admin_init' hook.
|
153 |
+
if (function_exists('get_current_screen'))
|
154 |
+
{
|
155 |
+
$current_screen = get_current_screen();
|
156 |
|
157 |
+
// Load preference API call only in woocommerce admin settings page.
|
158 |
+
if ($current_screen->id == 'woocommerce_page_wc-settings')
|
159 |
+
{
|
160 |
+
if (!empty($this->getSetting('key_id')) && !empty($this->getSetting('key_secret')))
|
161 |
+
{
|
162 |
+
try {
|
163 |
|
164 |
+
$api = $this->getRazorpayApiInstance();
|
165 |
+
$merchantPreferences = $api->request->request('GET', 'merchant/1cc_preferences');
|
166 |
+
|
167 |
+
if (!empty($merchantPreferences['features']['one_click_checkout'])) {
|
168 |
+
$is1ccAvailable = true;
|
169 |
+
}
|
170 |
|
171 |
+
} catch (\Exception $e) {
|
172 |
+
rzpLogError($e->getMessage());
|
173 |
+
}
|
174 |
+
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
|
179 |
if ($is1ccAvailable) {
|
180 |
$this->visibleSettings = array_merge($this->visibleSettings, array(
|