diff --git a/readme.txt b/readme.txt index 09a65956..90c4e1e2 100644 --- a/readme.txt +++ b/readme.txt @@ -42,7 +42,7 @@ This is compatible with WooCommerce>=2.4, including the new 3.0 release. It has == Changelog == = 2.7.1 = -* Update the Razorpay Order notes key. +* Updated the Razorpay Order notes key from woocommerce_order_id to woocommerce_order_number. = 2.7.0 = * Added auto-webhook setup feature. diff --git a/woo-razorpay.php b/woo-razorpay.php index 232d1363..661a0c1a 100644 --- a/woo-razorpay.php +++ b/woo-razorpay.php @@ -269,8 +269,23 @@ public function autoEnableWebhook() $webhookExist = false; $webhookUrl = esc_url(admin_url('admin-post.php')) . '?action=rzp_wc_webhook'; - $enabled = $this->getSetting('enable_webhook'); - $secret = $this->getSetting('webhook_secret'); + $key_id = $this->getSetting('key_id'); + $key_secret = $this->getSetting('key_secret'); + $enabled = $this->getSetting('enable_webhook'); + $secret = $this->getSetting('webhook_secret'); + + //validating the key id and key secret set properly or not. + if($key_id == null || $key_secret == null) + { + ?> +
+
+
+