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) ); }