From b9634aee67de23d6ac7d5e80da5d1018d6126e15 Mon Sep 17 00:00:00 2001 From: ChetanGN Date: Fri, 24 Jun 2022 12:38:32 +0530 Subject: [PATCH 1/2] Bug fix for line item int issue --- woo-razorpay.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/woo-razorpay.php b/woo-razorpay.php index 4b039996..ae3a71e6 100644 --- a/woo-razorpay.php +++ b/woo-razorpay.php @@ -885,11 +885,11 @@ public function orderArg1CC($data, $order) $data['line_items'][$i]['variant_id'] = $item->get_variation_id(); $data['line_items'][$i]['price'] = (empty($productDetails['price'])=== false) ? round(wc_get_price_excluding_tax($product)*100) + round($item->get_subtotal_tax()*100 / $item->get_quantity()) : 0; $data['line_items'][$i]['offer_price'] = (empty($productDetails['sale_price'])=== false) ? (int) $productDetails['sale_price']*100 : $productDetails['price']*100; - $data['line_items'][$i]['tax_amount'] = (int)$item->get_subtotal_tax()*100; - $data['line_items'][$i]['quantity'] = $item->get_quantity(); + $data['line_items'][$i]['tax_amount'] = 0; // Quick fix to handle the int issue from BE + $data['line_items'][$i]['quantity'] = (int)$item->get_quantity(); $data['line_items'][$i]['name'] = $item->get_name(); $data['line_items'][$i]['description'] = $item->get_name(); - $data['line_items'][$i]['weight'] = $productDetails['weight']; + $data['line_items'][$i]['weight'] = 0; // Quick fix to handle the int issue from BE $productImage = $product->get_image_id()?? null; $data['line_items'][$i]['image_url'] = $productImage? wp_get_attachment_url( $productImage ) : null; $data['line_items'][$i]['product_url'] = $product->get_permalink(); From 219180424f3b682ddb367025a9bc5b0db1aa0d41 Mon Sep 17 00:00:00 2001 From: ChetanGN Date: Fri, 24 Jun 2022 12:45:12 +0530 Subject: [PATCH 2/2] version bump to 3.9.1 --- readme.txt | 5 ++++- woo-razorpay.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index 6f821868..78502a77 100644 --- a/readme.txt +++ b/readme.txt @@ -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.9.0 +Stable tag: 3.9.1 Requires PHP: 5.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -41,6 +41,9 @@ This is compatible with WooCommerce>=2.4, including the new 3.0 release. It has == Changelog == += 3.9.1 = +* Bug fix cart line item int issue for magic checkout. + = 3.9.0 = * Added Cart line item for magic checkout. * Bug fix in COD min/max amount restriction for magic checkout. diff --git a/woo-razorpay.php b/woo-razorpay.php index ae3a71e6..1306501d 100644 --- a/woo-razorpay.php +++ b/woo-razorpay.php @@ -3,8 +3,8 @@ * Plugin Name: Razorpay for WooCommerce * Plugin URI: https://razorpay.com * Description: Razorpay Payment Gateway Integration for WooCommerce - * Version: 3.9.0 - * Stable tag: 3.9.0 + * Version: 3.9.1 + * Stable tag: 3.9.1 * Author: Team Razorpay * WC tested up to: 6.4.1 * Author URI: https://razorpay.com