From 70a1ebd84c391307d102046df20bb89bb8e814aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=B0=D1=80=D0=B0=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC?= Date: Mon, 10 Aug 2020 11:03:35 +0300 Subject: [PATCH] Add selection of client roles: fix empty prop error --- src/include/class-wc-retailcrm-customers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/class-wc-retailcrm-customers.php b/src/include/class-wc-retailcrm-customers.php index 8592810..2e2c563 100644 --- a/src/include/class-wc-retailcrm-customers.php +++ b/src/include/class-wc-retailcrm-customers.php @@ -623,7 +623,7 @@ if (!class_exists('WC_Retailcrm_Customers')) : public function isCustomer($user) { $retailcrmSettings = array(); - if (array_key_exists('client_roles', $this->retailcrm_settings)) { + if (!empty($this->retailcrm_settings) && array_key_exists('client_roles', $this->retailcrm_settings)) { $retailcrmSettings = $this->retailcrm_settings['client_roles']; }