1
0
Fork 0
mirror of synced 2025-04-06 07:13:33 +03:00

Closes #119 - prevent search with empty email

This commit is contained in:
Pavel 2020-05-26 18:00:38 +03:00
parent d0dfc39da0
commit 3b8bc8f281

View file

@ -175,6 +175,10 @@ if (!class_exists('WC_Retailcrm_Customers')) :
if (isset($filter['externalId'])) {
$search = $this->retailcrm->customersGet($filter['externalId']);
} elseif (isset($filter['email'])) {
if (empty($filter['email']) && count($filter) == 1) {
return false;
}
$search = $this->retailcrm->customersList(array('email' => $filter['email']));
}