diff --git a/includes/plugin-instrumentation.php b/includes/plugin-instrumentation.php index 2f36f3f5..7b60f75b 100644 --- a/includes/plugin-instrumentation.php +++ b/includes/plugin-instrumentation.php @@ -275,7 +275,11 @@ public function getDefaultProperties($timestamp = true) } $paymentSettings = get_option('woocommerce_razorpay_settings'); -if ($paymentSettings !== false) +if (($paymentSettings !== false) and + (isset($paymentSettings['key_id']) === true) and + (empty($paymentSettings['key_id']) === false) and + (isset($paymentSettings['key_secret']) === true) and + (empty($paymentSettings['key_secret']) === false)) { $api = new Api($paymentSettings['key_id'], $paymentSettings['key_secret']);