Skip to content

Commit

Permalink
1cc fix version bump 4.6.7 (#559)
Browse files Browse the repository at this point in the history
* fixed variable check for 1cc flags and version bump 4.7.7
  • Loading branch information
ramth05 authored Jun 10, 2024
1 parent 0960cff commit bd90cb4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: razorpay
Tags: razorpay, payments, india, woocommerce, curlec, malaysia, ecommerce, international, cross border
Requires at least: 3.9.2
Tested up to: 6.4.2
Stable tag: 4.6.6
Stable tag: 4.6.7
Requires PHP: 7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -69,9 +69,13 @@ Razorpay is available for Store Owners and Merchants in

== Changelog ==

= 4.6.7 =
* Fixed, Reduced 1cc preferences API features check.

= 4.6.6 =
* Added, UT fixes.
* Fixed, Reduced 1cc preferences API calls.
* ( Bug present, for 1cc settings, please use 4.6.7)

= 4.6.5 =
* Added, UT to SVN ignore list.
Expand Down
28 changes: 15 additions & 13 deletions woo-razorpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Plugin Name: 1 Razorpay: Signup for FREE PG
* Plugin URI: https://razorpay.com
* Description: Razorpay Payment Gateway Integration for WooCommerce.Razorpay Welcome Back Offer: New to Razorpay? Sign up to enjoy FREE payments* of INR 2 lakh till March 31st! Transact before January 10th to grab the offer.
* Version: 4.6.6
* Stable tag: 4.6.6
* Version: 4.6.7
* Stable tag: 4.6.7
* Author: Team Razorpay
* WC tested up to: 7.9.0
* Author URI: https://razorpay.com
Expand Down Expand Up @@ -275,11 +275,11 @@ public function __construct($hooks = true)

// Load preference API call only for administrative interface + razorpay payment settings page.
if (current_user_can('administrator') &&
empty($merchantPreferences) === true &&
isset($_GET['tab']) === true &&
$_GET['tab'] === 'checkout' &&
isset($_GET['section']) === true &&
$_GET['section'] === 'razorpay')
(empty($merchantPreferences['features']['one_click_checkout']) === true) &&
(isset($_GET['tab']) === true) &&
($_GET['tab'] === 'checkout') &&
(isset($_GET['section']) === true) &&
($_GET['section'] === 'razorpay'))
{
if (!empty($this->getSetting('key_id')) && !empty($this->getSetting('key_secret')))
{
Expand All @@ -293,14 +293,16 @@ public function __construct($hooks = true)
rzpLogError($e->getMessage());
}
}
if (!empty($merchantPreferences['features']['one_click_checkout'])) {
$is1ccAvailable = true;
}
}

if (!empty($merchantPreferences['features']['one_cc_store_account'])) {
$isAccCreationAvailable = true;
}
if (!empty($merchantPreferences['features']['one_click_checkout'])) {
$is1ccAvailable = true;
}

if (!empty($merchantPreferences['features']['one_cc_store_account'])) {
$isAccCreationAvailable = true;
}


if ($is1ccAvailable) {
$this->visibleSettings = array_merge($this->visibleSettings, array(
Expand Down

0 comments on commit bd90cb4

Please sign in to comment.