From 5c413ca89d1c4aa1015b3eaba742222385bd5b20 Mon Sep 17 00:00:00 2001 From: Razorpay Date: Mon, 30 Dec 2024 18:09:30 +0530 Subject: [PATCH] changed config display for COD --- includes/api/cart.php | 2 ++ woo-razorpay.php | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/api/cart.php b/includes/api/cart.php index 421d8cba..9fbaf664 100644 --- a/includes/api/cart.php +++ b/includes/api/cart.php @@ -250,6 +250,8 @@ function cartResponse($couponCode){ $prefillData = getPrefillCartData($couponCode); $response['prefill'] = $prefillData; + $response['config'] = $razorpay->getDisplayConfig(); + $response['enable_ga_analytics'] = get_option('woocommerce_razorpay_settings')['enable_1cc_ga_analytics'] === 'yes' ? true : false; $response['enable_fb_analytics'] = get_option('woocommerce_razorpay_settings')['enable_1cc_fb_analytics'] === 'yes' ? true : false; diff --git a/woo-razorpay.php b/woo-razorpay.php index d2620ce5..2ca59c76 100644 --- a/woo-razorpay.php +++ b/woo-razorpay.php @@ -1547,8 +1547,6 @@ public function getDefaultCheckoutArguments($order) $productinfo = "Order $orderId"; - $config = $this->getDisplayConfig(); - return array( 'key' => $this->getSetting('key_id'), 'name' => html_entity_decode(get_bloginfo('name'), ENT_QUOTES), @@ -1560,8 +1558,7 @@ public function getDefaultCheckoutArguments($order) ), 'order_id' => $razorpayOrderId, 'callback_url' => $callbackUrl, - 'prefill' => $this->getCustomerInfo($order), - 'config' => $config + 'prefill' => $this->getCustomerInfo($order) ); }