Skip to content

Commit

Permalink
PO-272 validation for instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulwahidsharief committed Jan 13, 2025
1 parent 864d26a commit 9b9dfc6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/plugin-instrumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand Down

0 comments on commit 9b9dfc6

Please sign in to comment.