Skip to content

Commit

Permalink
Merge pull request #245 from razorpay/1cc-preferences-api-update
Browse files Browse the repository at this point in the history
Replaced preference api call with 1cc_prefereces api
  • Loading branch information
ChetanGN authored Apr 4, 2022
2 parents 6033bac + cfec324 commit a27302f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 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, ecommerce
Requires at least: 3.9.2
Tested up to: 5.9
Stable tag: 3.1.0
Stable tag: 3.1.1
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -41,6 +41,9 @@ This is compatible with WooCommerce>=2.4, including the new 3.0 release. It has

== Changelog ==

= 3.1.1 =
* Updated the preferences API call to 1cc_preferences call.

= 3.1.0 =
* Support for Smart COD plugin in magic checkout.
* Payment title update for magic checkout COD orders.
Expand Down
8 changes: 4 additions & 4 deletions woo-razorpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Plugin Name: Razorpay for WooCommerce
* Plugin URI: https://razorpay.com
* Description: Razorpay Payment Gateway Integration for WooCommerce
* Version: 3.1.0
* Stable tag: 3.1.0
* Version: 3.1.1
* Stable tag: 3.1.1
* Author: Team Razorpay
* WC tested up to: 6.2.1
* Author URI: https://razorpay.com
Expand Down Expand Up @@ -150,8 +150,8 @@ public function __construct($hooks = true)
$is1ccAvailable = false;

try {
$api = new Api($this->getSetting('key_id'), '');
$merchantPreferences = $api->request->request('GET', 'preferences');
$api = $this->getRazorpayApiInstance();
$merchantPreferences = $api->request->request('GET', 'merchant/1cc_preferences');

if (!empty($merchantPreferences['features']['one_click_checkout'])) {
$is1ccAvailable = true;
Expand Down

0 comments on commit a27302f

Please sign in to comment.